Skip to main content

RenderingContext object

RenderingContext object is created for each rendering target, it enables graphic rendering to the specified destination through method calls within the rendering context. Additionally, the rendering context retains context-specific elements such as line width and fill colors that affect the rendering process.

Constructors

Constructor
graphics.rendering_context()

Properties

NameDescription
RenderingContext.brushCurrent brush
RenderingContext.fontCurrent font
RenderingContext.stroke_widthCurrent stroke width
RenderingContext.opacity_maskBitmap used as opacity mask

Methods

NameDescription
RenderingContext:finish_rendering()Finalize the drawing process
RenderingContext:set_brush()Set a brush to the context
RenderingContext:set_font()Set a font to the context
RenderingContext:set_stroke_width()Set a stroke width to the context
RenderingContext:set_opacity_mask()Set a bitmap used as opacity mask to the context
RenderingContext:draw_geometry()Draw a geometry
RenderingContext:fill_geometry()Fill a geometry
RenderingContext:draw_bitmap()Draw a bitmap
RenderingContext:draw_string()Draw a string
RenderingContext:draw_number()Draw a formated string of a numeric value
RenderingContext:fill_rectangle()Fill a rectangle

See Also