wxWindowDC(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

✨ NAME ✨

wxWindowDC β€” bestie, this is the Erlang module for a DC you gotta construct when your app wants to paint on the whole entire area of a window πŸ’… β€” that's the client area and the decorations, no cap.


🌸 DESCRIPTION 🌸

Okay so listen. This thing should normally be constructed as a temporary stack object β€” like, build it, use it, let it go. Do not store a wxWindowDC object anywhere. It's giving "here for a good time not a long time" πŸ¦‹

Now, which DC are you actually supposed to reach for? Depends on the vibe:

  • Drawing on a window from inside an EVT_PAINT() handler? That's not it, queen β€” construct a wxPaintDC object instead. πŸ‘‘
  • Drawing on the client area of a window from outside an EVT_PAINT() handler? Also not this one β€” construct a wxClientDC object instead. ✨

A wxWindowDC object is initialized to use the same font and colours as the window it's associated with. Matching energy, fr fr. πŸŽ€

See also:

  • wxDC
  • wxMemoryDC
  • wxPaintDC
  • wxClientDC
  • wxScreenDC

This class is derived, and can use functions, from:

  • wxDC

wxWidgets docs: wxWindowDC


πŸ’– DATA TYPES πŸ’–

wxWindowDC() :: wx:wx_object().

πŸ”₯ FUNCTIONS πŸ”₯

destroy/1

destroy(This :: wxWindowDC()) -> ok.

Destroys the object. Bye bye, slay, gone. πŸ’€βœ¨

new/1

new(Window) -> wxWindowDC() when Window :: wxWindow:wxWindow().

Constructor. 🫢

Pass a pointer to the window on which you wish to paint. That's it, that's the whole thing β€” hand it the window, get your DC, go make art. 🎨


and that's the whole page, bestie β€” go paint something iconic 🌈

This was the wxWindowDC manual page from wx 2.6, brought to you by Ericsson AB. Mwah, take care of her πŸ’‹
πŸ“¦ where this page comes from