wxGCDC(3erl)

πŸŽ€ wxGCDC(3erl) β€” Erlang Module Definition πŸŽ€

okay bestie, welcome to the wxGCDC manual page. we're doing the Erlang module definition together, and honestly? it's giving niche but iconic πŸ’…

✨ NAME ✨

wxGCDC β€” Functions for wxGCDC class.

πŸ¦‹ DESCRIPTION πŸ¦‹

wxGCDC is a device context that draws on a wxGraphicsContext.

wxGCDC does its best to implement the wxDC API, but the following features are not (fully) implemented because wxGraphicsContext doesn't support them:

bestie, the page doesn't spell out that list here β€” that's the whole situation πŸ’€ moving on!

See: wxDC, wxGraphicsContext

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

wxWidgets docs: wxGCDC

🧚 DATA TYPES 🧚

wxGCDC() = wx:wx_object()

πŸ’… EXPORTS πŸ’…

new() -> wxGCDC()

Constructs a fresh wxGCDC. yes ma'am, zero arguments, all vibes ✨

new(WindowDC) -> wxGCDC()

Types:

WindowDC =
    wxWindowDC:wxWindowDC() |
    wxMemoryDC:wxMemoryDC() |
    wxGraphicsContext:wxGraphicsContext()

Constructs a wxGCDC from a wxWindowDC. exactly that, no cap 🫢

destroy(This :: wxGCDC()) -> ok

Destroys this wxGCDC object and returns ok. bye bestie πŸ‘‹

getGraphicsContext(This) -> wxGraphicsContext:wxGraphicsContext()

Types:

This = wxGCDC()

Retrieves associated wxGraphicsContext.

setGraphicsContext(This, Context) -> ok

Types:

This = wxGCDC()
Context = wxGraphicsContext:wxGraphicsContext()

Set the graphics context to be used for this wxGCDC.

🚨 ownership tea: Note that this object takes ownership of context and will delete it when it is destroyed or when setGraphicsContext/2 is called again. so yeah, it's owned by this object now β€” that's the arrangement πŸ’–

Also, unlike the constructor taking wxGraphicsContext, this method will reapply the current font, pen and brush, so that this object continues to use them, if they had been changed before (which is never the case when constructing wxGCDC directly from wxGraphicsContext).


and that's the whole page, bestie! footer vibe check: wxWidgets team, wx 2.2.2.1, wxGCDC(3erl). mwah πŸ’‹

πŸ“¦ where this page comes from