wxGraphicsContext
Creation Parameters
- integer from_type: one of GC_DC, GC_WINDOW, GC_NATIVE_CONTEXT, GC_NATIVE_WINDOW
- atom from_ptr: The wxDC, wxWindow, native context or native window
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
- proc gc_clip( atom context, atom x, atom y, atom w, atom h )
- proc gc_concat_transform( atom context, atom matrix )
- proc gc_draw_bitmap( atom context, atom bmp, atom x, atom y, atom w, atom h )
- proc gc_draw_ellipse( atom context, atom x, atom y, atom w, atom h )
- proc gc_draw_icon( atom context, atom icon, atom x, atom y, atom w, atom h )
- proc gc_draw_path( atom context, atom path, atom fill_style [=wxODDEVEN_RULE] )
- proc gc_draw_rectangle( atom context, atom x, atom y, atom w, atom h )
- proc gc_draw_rounded_rectangle( atom context, atom x, atom y, atom w, atom h, atom radius )
- proc gc_draw_text( atom context, object str, atom x, atom y, atom angle )
- proc gc_fill_path( atom context, atom path, atom fill_style )
- func gc_get_native_context( atom context )
- func gc_get_partial_text_extents( atom context, object text )
- func gc_get_text_extent( atom context, object text )
- func gc_get_transform( atom context )
- proc gc_reset_clip( atom context )
- proc gc_rotate( atom context, atom angle )
- proc gc_scale( atom context, atom x_scale, atom y_scale )
- proc gc_set_brush( atom context, atom brush )
- proc gc_set_font( atom context, atom font, atom color )
- proc gc_set_graphics_brush( atom context, atom brush )
- proc gc_set_graphics_font( atom context, atom font )
- proc gc_set_graphics_pen( atom context, atom pen )
- proc gc_set_pen( atom context, atom pen )
- proc gc_set_transform( atom context, atom matrix )
- proc gc_stroke_line( atom context, atom x1, atom y1, atom x2, atom y2 )
- proc gc_stroke_lines( atom context, object points )
- proc gc_stroke_path( atom context, atom path )
- proc gc_translate( atom context, atom dx, atom dy )
Supertopics
wxGraphicsContext
[proc]
gc_clip ( atom context, atom x, atom y, atom w, atom h )
Category:
wxGraphicsContext
Clips drawings to the rectangle.
wxGraphicsContext
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
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
Category:
wxGraphicsContext
Returns the native context (CGContextRef for Core Graphics, Graphics pointer for GDIPlus and cairo_t pointer for cairo).
wxGraphicsContext
Category:
wxGraphicsContext
Returns a sequence of widths with the widths from the beginning of text to the corresponding character of text.
wxGraphicsContext
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
Category:
wxGraphicsContext
Gets the current transformation matrix of this context.
Returns a wxGraphicsMatrix.
wxGraphicsContext
Category:
wxGraphicsContext
Resets the clipping to original shape.
wxGraphicsContext
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
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
Category:
wxGraphicsContext
Sets the brush for filling paths. Note that brush is a wxGraphicsBrush.
wxGraphicsContext
Category:
wxGraphicsContext
Sets the font for drawing text. Note that font is a wxGraphicsFont.
wxGraphicsContext
Category:
wxGraphicsContext
Sets the pen used for stroking. Note that pen is a wxGraphicsPen.
wxGraphicsContext
Category:
wxGraphicsContext
Sets the pen used for stroking. Note that pen is a wxPen.
wxGraphicsContext
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
Category:
wxGraphicsContext
Stroke disconnected lines from begin to end points, fastest method available for this purpose.
wxGraphicsContext
Category:
wxGraphicsContext
Strokes along a path with the current pen.
wxGraphicsContext
Category:
wxGraphicsContext
Translates the current transformation matrix.