wxGCDC(3)
π wxGCDC π
okay so bestie, welcome to the Erlang module definition for wxGCDC β this is a device context that draws on a wxGraphicsContext. yes. she's a whole vibe. let's get into it π«Ά
β¨ NAME β¨
wxGCDC β bestie, she is a device context that draws on a wxGraphicsContext. iconic behavior honestly.
πΈ DESCRIPTION πΈ
so wxGCDC is out here doing her absolute best to implement the wxDC API, and honestly? she ate. but there are some features that are not (fully) implemented, because wxGraphicsContext simply doesn't support them, and that's just the way it is π
- the
wxDC:getPixel/2method is not implemented and always returns false, because modern graphics layers do not support retrieving the contents of the drawn pixels. not her fault, she's just living in the present π¦ - the
wxDC:floodFill/4method is not implemented, and can't be β like, it's literally not possible β because its functionality also relies on reading the pixels fromwxGraphicsContext. no pixels to read, no flood to fill, periodt π - the
wxDC:setLogicalFunction/2method only works with thewxCOPY,wxOR,wxNO_OP,wxCLEARandwxXORfunctions. attempts to use any other function (includingwxINVERT) do absolutely nothing. it's giving silent treatment π - similarly, the
?wxRasterOperationModeparameter ofwxDC:blit/6andStretchBlit()(not implemented in wx) can only be one of the supported logical functions listed above. using any other function will result in an assertion failure and not drawing anything. so like, please don't π - for Direct2D-based
wxGraphicsContext, only true-type fonts can be used in the font-related functions. fancy fonts, go home β¨
see also, bestie:
wxDCwxGraphicsContext
this class is derived, and can use functions, from:
wxDC
wxWidgets docs: wxGCDC
π DATA TYPES π
wxGCDC() :: wx:wx_object().
π FUNCTIONS π
destroy(This :: wxGCDC()) -> ok.
Destroys the object. bye bestie, it was real ππ
getGraphicsContext(This) -> wxGraphicsContext:wxGraphicsContext() when This :: wxGCDC().
Retrieves the associated wxGraphicsContext. like, she's bringing her friend along π«Ά
new() -> wxGCDC().
no args, just vibes β¨
new(WindowDC) -> wxGCDC() when WindowDC :: wxWindowDC:wxWindowDC() | wxMemoryDC:wxMemoryDC() | wxGraphicsContext:wxGraphicsContext().
Constructs a wxGCDC from a wxWindowDC. slay π
setGraphicsContext(This, Context) -> ok when This :: wxGCDC(), Context :: wxGraphicsContext:wxGraphicsContext().
Set the graphics context to be used for this wxGCDC.
π note that this object takes ownership ofcontextand will delete it when it is destroyed or whensetGraphicsContext/2is called again. so like, don't be out here using a context you handed over, she's got it now π
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). it's giving main character energy, she remembers her whole fit ππ¦
and that's the whole page, bestie!! much love to Ericsson AB, this is from wx 2.6, and it's the wxGCDC(3) manual page β go forth and draw, queen πβ¨π
π¦ 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