wxGraphicsContext

wxGraphicsContext

Creation Parameters

A wxGraphicsContext instance is the object that is drawn upon. It is created by a renderer using the CreateContext calls.., this can be either directly using a renderer instance, or indirectly using the static convenience CreateXXX functions of wxGraphicsContext that always delegate the task to the default renderer.

Functions/Procedures
Supertopics

wxGraphicsContext

[proc]
gc_clip
( atom context, atom x, atom y, atom w, atom h )

Category: wxGraphicsContext

Clips drawings to the rectangle.


wxGraphicsContext

[proc]
gc_concat_transform
( atom context, atom matrix )

Category: wxGraphicsContext

Concatenates the passed in transform with the current transform of this context


wxGraphicsContext

[proc]
gc_draw_bitmap
( atom context, atom bmp, atom x, atom y, atom w, atom h )

Category: wxGraphicsContext

Draws the bitmap. In case of a mono bitmap, this is treated as a mask and the current brushed is used for filling.


wxGraphicsContext

[proc]
gc_draw_ellipse
( atom context, atom x, atom y, atom w, atom h )

Category: wxGraphicsContext

Draws an ellipse.


wxGraphicsContext

[proc]
gc_draw_icon
( atom context, atom icon, atom x, atom y, atom w, atom h )

Category: wxGraphicsContext

Draws the icon.


wxGraphicsContext

[proc]
gc_draw_path
( atom context, atom path, atom fill_style [=wxODDEVEN_RULE] )

Category: wxGraphicsContext

Draws the path by first filling and then stroking.


wxGraphicsContext

[proc]
gc_draw_rectangle
( atom context, atom x, atom y, atom w, atom h )

Category: wxGraphicsContext

Draws a rectangle.


wxGraphicsContext

[proc]
gc_draw_rounded_rectangle
( atom context, atom x, atom y, atom w, atom h, atom radius )

Category: wxGraphicsContext

Draws a rounded rectangle.


wxGraphicsContext

[proc]
gc_draw_text
( atom context, object str, atom x, atom y, atom angle )

Category: wxGraphicsContext

Draws a text at the defined position, at the given angle.


wxGraphicsContext

[proc]
gc_fill_path
( atom context, atom path, atom fill_style )

Category: wxGraphicsContext

Fills the path with the current brush.


wxGraphicsContext

[func]
gc_get_native_context
( atom context )

Category: wxGraphicsContext

Returns the native context (CGContextRef for Core Graphics, Graphics pointer for GDIPlus and cairo_t pointer for cairo).


wxGraphicsContext

[func]
gc_get_partial_text_extents
( atom context, object text )

Category: wxGraphicsContext

Returns a sequence of widths with the widths from the beginning of text to the corresponding character of text.


wxGraphicsContext

[func]
gc_get_text_extent
( atom context, object text )

Category: wxGraphicsContext

Gets the dimensions of the string using the currently selected font. string is the text string to measure, w and h are the total width and height respectively, descent is the dimension from the baseline of the font to the bottom of the descender, and externalLeading is any extra vertical space added to the font by the font designer (usually is zero).

Returns a sequence: { width, height, descent, external_leading }


wxGraphicsContext

[func]
gc_get_transform
( atom context )

Category: wxGraphicsContext

Gets the current transformation matrix of this context. Returns a wxGraphicsMatrix.


wxGraphicsContext

[proc]
gc_reset_clip
( atom context )

Category: wxGraphicsContext

Resets the clipping to original shape.


wxGraphicsContext

[proc]
gc_rotate
( atom context, atom angle )

Category: wxGraphicsContext

Rotates the current transformation matrix (radians).


wxGraphicsContext

[proc]
gc_scale
( atom context, atom x_scale, atom y_scale )

Category: wxGraphicsContext

Scales the current transformation matrix.


wxGraphicsContext

[proc]
gc_set_brush
( atom context, atom brush )

Category: wxGraphicsContext

Sets the brush for filling paths. Note that brush is a wxBrush.


wxGraphicsContext

[proc]
gc_set_font
( atom context, atom font, atom color )

Category: wxGraphicsContext

Sets the font for drawing text. Note that font is a wxFont.


wxGraphicsContext

[proc]
gc_set_graphics_brush
( atom context, atom brush )

Category: wxGraphicsContext

Sets the brush for filling paths. Note that brush is a wxGraphicsBrush.


wxGraphicsContext

[proc]
gc_set_graphics_font
( atom context, atom font )

Category: wxGraphicsContext

Sets the font for drawing text. Note that font is a wxGraphicsFont.


wxGraphicsContext

[proc]
gc_set_graphics_pen
( atom context, atom pen )

Category: wxGraphicsContext

Sets the pen used for stroking. Note that pen is a wxGraphicsPen.


wxGraphicsContext

[proc]
gc_set_pen
( atom context, atom pen )

Category: wxGraphicsContext

Sets the pen used for stroking. Note that pen is a wxPen.


wxGraphicsContext

[proc]
gc_set_transform
( atom context, atom matrix )

Category: wxGraphicsContext

Sets the current transformation matrix of this context


wxGraphicsContext

[proc]
gc_stroke_line
( atom context, atom x1, atom y1, atom x2, atom y2 )

Category: wxGraphicsContext

Strokes a single line.


wxGraphicsContext

[proc]
gc_stroke_lines
( atom context, object points )

Category: wxGraphicsContext

Stroke disconnected lines from begin to end points, fastest method available for this purpose.


wxGraphicsContext

[proc]
gc_stroke_path
( atom context, atom path )

Category: wxGraphicsContext

Strokes along a path with the current pen.


wxGraphicsContext

[proc]
gc_translate
( atom context, atom dx, atom dy )

Category: wxGraphicsContext

Translates the current transformation matrix.