wxGraphicsRenderer(3)
π wxGraphicsRenderer π
okay bestie, gather round, because we're talking about wxGraphicsRenderer β the Erlang module definition for the renderer that's basically the glow-up engine of wxWidgets. this is the instance that corresponds to the rendering engine used. that's it. that's the whole vibe. β¨
πΈ NAME πΈ
wxGraphicsRenderer β a wxGraphicsRenderer is the instance corresponding to the rendering engine used. no cap. π
π¦ DESCRIPTION π¦
ok so here's the tea: there may be multiple instances on a system, if there are different rendering engines present. but β and this is the important part β there is always only one instance per engine. every single one. no duplicates, no clones, no drama. π
and the way you find that one instance? all objects created by it (wxGraphicsContext, wxGraphicsPath etc.) point right back to it, and you can grab it through their wxGraphicsObject:getRenderer/1 method. so if you ever wanna create an additional instance of a path or whatever, you hit up wxGraphicsObject:getRenderer/1 and then use the appropriate CreateXXX() function of that renderer. it's giving "ask your bestie for the connect." π«Ά
wxWidgets docs: wxGraphicsRenderer
β¨ DATA TYPES β¨
wxGraphicsRenderer()::wx:wx_object().
π FUNCTIONS π
π createBrush(This, Brush) -> wxGraphicsBrush:wxGraphicsBrush()
createBrush(This, Brush) -> wxGraphicsBrush:wxGraphicsBrush()
when
This :: wxGraphicsRenderer(),
Brush :: wxBrush:wxBrush().
creates a native brush from a wxBrush. that's the whole task, and it ate. π₯
π createContext(This, WindowDC) -> wxGraphicsContext:wxGraphicsContext()
createContext(This, WindowDC) ->
wxGraphicsContext:wxGraphicsContext()
when
This :: wxGraphicsRenderer(),
WindowDC ::
wxWindowDC:wxWindowDC() |
wxWindow:wxWindow() |
wxMemoryDC:wxMemoryDC().
creates a wxGraphicsContext from a wxWindowDC. iconic behavior honestly. β
π createFont(This, SizeInPixels, Facename) -> wxGraphicsFont:wxGraphicsFont()
createFont(This, SizeInPixels, Facename) ->
wxGraphicsFont:wxGraphicsFont()
when
This :: wxGraphicsRenderer(),
SizeInPixels :: number(),
Facename :: unicode:chardata();
(This, Font, [Option]) ->
wxGraphicsFont:wxGraphicsFont()
when
This :: wxGraphicsRenderer(),
Font :: wxFont:wxFont(),
Option :: {col, wx:wx_colour()}.
creates a native graphics font from a wxFont and a text colour. π
π createFont(This, SizeInPixels, Facename, [Option]) -> wxGraphicsFont:wxGraphicsFont()
createFont(This, SizeInPixels, Facename, [Option]) ->
wxGraphicsFont:wxGraphicsFont()
when
This :: wxGraphicsRenderer(),
SizeInPixels :: number(),
Facename :: unicode:chardata(),
Option ::
{flags, integer()} | {col, wx:wx_colour()}.
creates a graphics font with the given characteristics. cute, right? π
okay but listen β if possible, thecreateFont/4overload takingwxFontshould be used instead. the main advantage of this overload is that it can be used without an X server connection under Unix when using Cairo. so like, it has range. π
Since: 2.9.3
π createLinearGradientBrush(This, X1, Y1, X2, Y2, Stops) -> wxGraphicsBrush:wxGraphicsBrush()
createLinearGradientBrush(This, X1, Y1, X2, Y2, Stops) ->
wxGraphicsBrush:wxGraphicsBrush()
when
This :: wxGraphicsRenderer(),
X1 :: number(),
Y1 :: number(),
X2 :: number(),
Y2 :: number(),
Stops ::
wxGraphicsGradientStops:wxGraphicsGradientStops().
creates a native brush with a linear gradient. gorgeous. no notes. π
stops support is new since wxWidgets 2.9.1 β previously only the start and end colours could be specified. glow-up fr fr.
the ability to apply a transformation matrix to the gradient was added in 3.1.3. π
π createMatrix(This, [Option]) -> wxGraphicsMatrix:wxGraphicsMatrix()
createMatrix(This, [Option]) ->
wxGraphicsMatrix:wxGraphicsMatrix()
when
This :: wxGraphicsRenderer(),
Option ::
{a, number()} |
{b, number()} |
{c, number()} |
{d, number()} |
{tx, number()} |
{ty, number()}.
creates a native affine transformation matrix from the passed in values.
the defaults result in an identity matrix. main character energy, honestly β knows exactly who it is. β¨
π createPath(This) -> wxGraphicsPath:wxGraphicsPath()
createPath(This) -> wxGraphicsPath:wxGraphicsPath()
when This :: wxGraphicsRenderer().
creates a native graphics path which is initially empty. a blank canvas, a fresh start, the beginning of the semester. π¦
π createRadialGradientBrush(This, StartX, StartY, EndX, EndY, Radius, Stops) -> wxGraphicsBrush:wxGraphicsBrush()
createRadialGradientBrush(This, StartX, StartY, EndX, EndY,
Radius, Stops) ->
wxGraphicsBrush:wxGraphicsBrush()
when
This :: wxGraphicsRenderer(),
StartX :: number(),
StartY :: number(),
EndX :: number(),
EndY :: number(),
Radius :: number(),
Stops ::
wxGraphicsGradientStops:wxGraphicsGradientStops().
creates a native brush with a radial gradient. the circular icon we deserve. πΈ
stops support is new since wxWidgets 2.9.1 β previously only the start and end colours could be specified.
the ability to apply a transformation matrix to the gradient was added in 3.1.3. π
π getDefaultRenderer() -> wxGraphicsRenderer()
getDefaultRenderer() -> wxGraphicsRenderer().
returns the default renderer on this platform. π
- on macOS this is the Core Graphics (a.k.a. Quartz 2D) renderer
- on MSW the GDIPlus renderer
- on GTK we currently default to the Cairo renderer
three platforms, three icons, all slaying. periodt. π
and that's the whole page, bestie! this was written by Ericsson AB, for wx 2.6, and the base header said wxGraphicsRenderer(3) with Erlang Module Definition up top β so yeah, go forth and render responsibly. mwah. πβ¨π
π¦ 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