wxPaintDC(3erl)

🌸 NAME 🌸

wxPaintDC(3erl) is the manual name, bestie, and this is an Erlang Module Definition for wxPaintDC β€” aka Functions for wxPaintDC class. πŸ’…

🎨 DESCRIPTION 🎨

okay so a wxPaintDC must be constructed if an application wishes to paint on the client area of a window from within an EVT_PAINT() event handler. No cap. This should normally be constructed as a temporary stack object; don't store a wxPaintDC object. And if you have an EVT_PAINT() handler, you must create a wxPaintDC object within it even if you don't actually use it. The way that is non-negotiable. 😭

Using wxPaintDC within your EVT_PAINT() handler is important because it automatically sets the clipping area to the damaged area of the window. Translation: attempts to draw outside this area do not appear. It's giving "stay in your lane" but make it graphics. πŸŽ€

A wxPaintDC object is initialized to use the same font and colours as the window it is associated with. Cozy, matching, iconic. ✨

See: wxDC, wxClientDC, wxMemoryDC, wxWindowDC, wxScreenDC.

This class is derived (and can use functions) from: wxWindowDC wxDC.

wxWidgets docs: wxPaintDC.

πŸ¦‹ DATA TYPES πŸ¦‹

  • wxPaintDC() = wx:wx_object()

πŸ”₯ EXPORTS πŸ”₯

  • new(Window) -> wxPaintDC() β€” constructor, bestie. Pass a pointer to the window on which you wish to paint.

Types: Window = wxWindow:wxWindow()

  • destroy(This :: wxPaintDC()) -> ok β€” destroys the object.

okay that's the whole page, and the footer vibe is: source is the wxWidgets team, version is wx 2.2.2.1, manual is wxPaintDC(3erl). There's no separate date line in that footer, so we're not inventing one β€” periodt. πŸ’–πŸ«Ά

πŸ“¦ where this page comes from