wxMask(3)
π wxMask β the Erlang module, bestie edition π
okay so this is the manual page for wxMask(3), which lives in the Erlang module definition section of the wx docs. it's giving β¨bitmap maskingβ¨ and honestly? iconic.
πΈ NAME πΈ
wxMask β this class encapsulates a monochrome mask bitmap, where the masked area is black and the unmasked area is white. no cap, that's the whole vibe. π€π€
π¦ DESCRIPTION π¦
so here's the tea β β when you associate one of these with a bitmap and draw it in a device context, the unmasked area of the bitmap gets drawn, and the masked area does not get drawn. it's literally just "show this, hide that." main character energy for pixels. π
β οΈ note, bestie: a mask can also be associated with a bitmap that has an alpha channel β BUT drawing those bitmaps under wxMSW may be slow. so if drawing performance matters to you at all, pls avoid that. fr fr. ππ
See also, queen:
wxBitmapwxDC:blit/6wxMemoryDC
also, wxWidgets docs pointer: wxMask β go look it up if you want the C++ side of the story. πβ¨
π DATA TYPES π
wxMask() :: wx:wx_object().
that's it. that's the type. short, sweet, slay. π
π FUNCTIONS π
π create/2
create(This, Bitmap) -> boolean()
when This :: wxMask(), Bitmap :: wxBitmap:wxBitmap().
Constructs a mask from a monochrome bitmap. simple as that. π€π€
π create/3
create(This, Bitmap, Index) -> boolean()
when
This :: wxMask(),
Bitmap :: wxBitmap:wxBitmap(),
Index :: integer();
(This, Bitmap, Colour) -> boolean()
when
This :: wxMask(),
Bitmap :: wxBitmap:wxBitmap(),
Colour :: wx:wx_colour().
two ways to do the thing, pick your fighter: constructs a mask from a bitmap and a colour that indicates the background. π¨β¨
π destroy/1
destroy(This :: wxMask()) -> ok.
Destroys the object. bye bestie, we hardly knew ye ππ
π new/0
new() -> wxMask().
Default constructor. no notes, just vibes. π«Ά
π new/1
new(Bitmap) -> wxMask() when Bitmap :: wxBitmap:wxBitmap().
Constructs a mask from a monochrome bitmap. same energy as create/2 but make it a constructor. π«
π new/2
new(Bitmap, Index) -> wxMask()
when Bitmap :: wxBitmap:wxBitmap(), Index :: integer();
(Bitmap, Colour) -> wxMask()
when
Bitmap :: wxBitmap:wxBitmap(), Colour ::
wx:wx_colour().
yep, and again with a colour: constructs a mask from a bitmap and a colour that indicates the background. π¨π
π§ reminder to my darling reader: an alpha-channel bitmap can be masked too, but under wxMSW that drawing may be slow. protect your frame rate, babe. π«Ά
that's the whole page!! go mask something gorgeous π β¨
this lil masterpiece came to you from Ericsson AB, version wx 2.6, dated wxMask(3). mwah, bye bestie πππ¦
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms