Top |
void | grx_draw_line_with_options () |
void | grx_draw_box_with_options () |
void | grx_draw_circle_with_options () |
void | grx_draw_ellipse_with_options () |
void | grx_draw_circle_arc_with_options () |
void | grx_draw_ellipse_arc_with_options () |
void | grx_draw_polyline_with_options () |
void | grx_draw_polygon_with_options () |
The basic line drawing graphics primitives described previously always draw continuous lines which are one pixel wide. This group of line drawing functions can be used to draw wide and/or patterned lines. These functions have similar parameter passing conventions as the basic ones with one difference: instead of the color value a GrxLineOptions is passed instead.
void grx_draw_line_with_options (gint x1
,gint y1
,gint x2
,gint y2
,const GrxLineOptions *o
);
Draws a line on the current context from the starting coordinates to the ending coordinates using the specified options.
void grx_draw_box_with_options (gint x1
,gint y1
,gint x2
,gint y2
,const GrxLineOptions *o
);
Draws a rectangle on the current context using the specified coordinates and options.
void grx_draw_circle_with_options (gint xc
,gint yc
,gint r
,const GrxLineOptions *o
);
Draws a circle on the current context centered at the specified coordinates with the specified radius and options.
void grx_draw_ellipse_with_options (gint xc
,gint yc
,gint rx
,gint ry
,const GrxLineOptions *o
);
Draws an ellipse on the current context using the specified options.
The ellipse can only draw ellipses with its major axis parallel with either the X or Y coordinate axis
void grx_draw_circle_arc_with_options (gint xc
,gint yc
,gint r
,gint start
,gint end
,GrxArcStyle style
,const GrxLineOptions *o
);
Draws an arc on the current context centered at the specified coordinates from the starting angle to the ending angle with the specified radius, arc style and options.
void grx_draw_ellipse_arc_with_options (gint xc
,gint yc
,gint rx
,gint ry
,gint start
,gint end
,GrxArcStyle style
,const GrxLineOptions *o
);
Draws an arc on the current context centered at the specified coordinates from the starting angle to the ending angle with the specified radii, arc style and options.
void grx_draw_polyline_with_options (gint n_points
,GrxPoint *points
,const GrxLineOptions *o
);
Draw a multi-segment line on the current context that connects each point in
the points
array using the specified options.
n_points |
the number of points in |
|
points |
an array of GrxPoint. |
[array length=n_points] |
o |
the options |
void grx_draw_polygon_with_options (gint n_points
,GrxPoint *points
,const GrxLineOptions *o
);
Draw a closed polygon on the current context that connects each point in
the points
array using the specified options.
Coordinate arrays can either contain or omit the closing edge of the polygon. It will be automatically appended to the list if it is missing.
n_points |
the number of points in |
|
points |
an array of GrxPoint. |
[array length=n_points] |
o |
the options |
typedef struct { GrxColor color; gint width; gint n_dash_patterns; guint8 dash_pattern0; guint8 dash_pattern1; guint8 dash_pattern2; guint8 dash_pattern3; guint8 dash_pattern4; guint8 dash_pattern5; guint8 dash_pattern6; guint8 dash_pattern7; } GrxLineOptions;
Custom line options structure.
Zero or one dash pattern length means the line is continuous. The dash pattern always begins with a drawn section.
Example, a white line 3 pixels wide (thick) and pixmap 6 pixels draw, 4 pixels nodraw:
GrxLineOptions my_line_options; ... my_line_options.color = GRX_COLOR_WHITE; my_line_options.width = 3; my_line_options.n_dash_patterns = 2; my_line_options.dash_pattern0 = 6; my_line_options.dash_pattern1 = 4; ...
GrxColor |
color used to draw line |
|
gint |
width of the line |
|
gint |
length of the dash pattern |
|
guint8 |
draw/nodraw pattern |
|
guint8 |
draw/nodraw pattern |
|
guint8 |
draw/nodraw pattern |
|
guint8 |
draw/nodraw pattern |
|
guint8 |
draw/nodraw pattern |
|
guint8 |
draw/nodraw pattern |
|
guint8 |
draw/nodraw pattern |
|
guint8 |
draw/nodraw pattern |