Top | ![]() |
![]() |
![]() |
![]() |
Functions
Types and Values
enum | GoJustification |
#define | GOG_RENDERER_GRIP_SIZE |
#define | GOG_RENDERER_HAIRLINE_WIDTH_PTS |
Description
Note that GogGraph has a functions for export/rendering, so you do not always need to use a GogRenderer directly.
Functions
gog_renderer_draw_circle ()
void gog_renderer_draw_circle (GogRenderer *rend
,double x
,double y
,double r
);
gog_renderer_draw_color_map ()
void gog_renderer_draw_color_map (GogRenderer *rend
,GogAxisColorMap const *map
,int discrete
,gboolean horizontal
,GogViewAllocation const *rect
);
gog_renderer_draw_data_label ()
void gog_renderer_draw_data_label (GogRenderer *rend
,GogSeriesLabelElt const *elt
,GogViewAllocation const *pos
,GOAnchorType anchor
,GOStyle *legend_style
);
gog_renderer_draw_gostring ()
void gog_renderer_draw_gostring (GogRenderer *rend
,GOString *str
,GogViewAllocation const *pos
,GOAnchorType anchor
,GoJustification justification
,double width
);
Have rend
draw layout
in the at pos
.{x,y} anchored by the anchor
corner.
If pos.w
or pos.h
are >= 0 then clip the results to less than that size.
Parameters
rend |
||
str |
the GOString to draw |
|
pos |
||
anchor |
GOAnchorType how to draw relative to |
|
justification |
GoJustification for multiline string. |
|
width |
if positive, the maximum width to get a multiline string if needed. |
gog_renderer_draw_grip ()
void gog_renderer_draw_grip (GogRenderer *renderer
,double x
,double y
);
Draw a grip, used for moving/resizing of objects.
gog_renderer_draw_rectangle ()
void gog_renderer_draw_rectangle (GogRenderer *rend
,GogViewAllocation const *rect
);
A utility routine to build a closed rectangle vpath.
gog_renderer_draw_rotated_rectangle ()
void gog_renderer_draw_rotated_rectangle (GogRenderer *rend
,GogViewAllocation const *rect
,gboolean rotate_bg
);
gog_renderer_draw_selection_rectangle ()
void gog_renderer_draw_selection_rectangle (GogRenderer *renderer
,GogViewAllocation const *rectangle
);
gog_renderer_draw_shape ()
void gog_renderer_draw_shape (GogRenderer *renderer
,GOPath const *path
);
gog_renderer_draw_text ()
void gog_renderer_draw_text (GogRenderer *rend
,char const *text
,GogViewAllocation const *pos
,GOAnchorType anchor
,gboolean use_markup
,GoJustification justification
,double width
);
Have rend
draw text
in the at pos
.{x,y} anchored by the anchor
corner.
If pos.w
or pos.h
are >= 0 then clip the results to less than that size.
Parameters
rend |
||
text |
the string to draw |
|
pos |
||
anchor |
GOAnchorType how to draw relative to |
|
use_markup |
wether to use pango markup |
|
justification |
GoJustification for multiline text. |
|
width |
if positive, the maximum width to get a multiline text if needed. |
gog_renderer_export_image ()
gboolean gog_renderer_export_image (GogRenderer *renderer
,GOImageFormat format
,GsfOutput *output
,double x_dpi
,double y_dpi
);
Exports an image of graph
in given format
, writing results in a GsfOutput stream.
If export format type is a bitmap one, it computes image size with x_dpi, y_dpi and
graph
size (see gog_graph_get_size()
).
Parameters
renderer |
||
format |
image format for export |
|
output |
a GsfOutput stream |
|
x_dpi |
x resolution of exported graph |
|
y_dpi |
y resolution of exported graph |
gog_renderer_fill_circle ()
void gog_renderer_fill_circle (GogRenderer *rend
,double x
,double y
,double r
);
gog_renderer_fill_rectangle ()
void gog_renderer_fill_rectangle (GogRenderer *rend
,GogViewAllocation const *rect
);
gog_renderer_fill_serie ()
void gog_renderer_fill_serie (GogRenderer *renderer
,GOPath const *path
,GOPath const *close_path
);
gog_renderer_fill_shape ()
void gog_renderer_fill_shape (GogRenderer *renderer
,GOPath const *path
);
gog_renderer_get_cairo_surface ()
cairo_surface_t *
gog_renderer_get_cairo_surface (GogRenderer *renderer
);
gog_renderer_get_gostring_AABR ()
void gog_renderer_get_gostring_AABR (GogRenderer *rend
,GOString *str
,GOGeometryAABR *aabr
,double max_width
);
Parameters
rend |
||
str |
the string to draw |
|
aabr |
GOGeometryAABR to store the Axis Aligned Bounding Rectangle of |
gog_renderer_get_gostring_OBR ()
void gog_renderer_get_gostring_OBR (GogRenderer *rend
,GOString *str
,GOGeometryOBR *obr
,double max_width
);
Parameters
rend |
||
str |
the string to draw |
|
obr |
GOGeometryOBR to store the Object Bounding Rectangle of |
gog_renderer_get_hairline_width_pts ()
double
gog_renderer_get_hairline_width_pts (GogRenderer const *rend
);
gog_renderer_get_text_AABR ()
void gog_renderer_get_text_AABR (GogRenderer *rend
,char const *text
,gboolean use_markup
,GOGeometryAABR *aabr
,double max_width
);
Parameters
rend |
||
text |
the string to draw |
|
use_markup |
whether to use pango markup |
|
aabr |
GOGeometryAABR to store the Axis Aligned Bounding Rectangle of |
gog_renderer_get_text_OBR ()
void gog_renderer_get_text_OBR (GogRenderer *rend
,char const *text
,gboolean use_markup
,GOGeometryOBR *obr
,double max_width
);
Parameters
rend |
||
text |
the string to draw |
|
use_markup |
wether to use pango markup |
|
obr |
GOGeometryOBR to store the Object Bounding Rectangle of |
gog_renderer_push_clip ()
void gog_renderer_push_clip (GogRenderer *rend
,GOPath const *path
);
Defines the current clipping region.
gog_renderer_push_clip_rectangle ()
void gog_renderer_push_clip_rectangle (GogRenderer *rend
,double x
,double y
,double w
,double h
);
Defines a rectangular clipping region. For efficient screen rendering, this function takes care to round the coordinates.
gog_renderer_render_to_cairo ()
gboolean gog_renderer_render_to_cairo (GogRenderer *renderer
,cairo_t *cairo
,double width
,double height
);
gog_renderer_stroke_circle ()
void gog_renderer_stroke_circle (GogRenderer *rend
,double x
,double y
,double r
);
gog_renderer_stroke_rectangle ()
void gog_renderer_stroke_rectangle (GogRenderer *rend
,GogViewAllocation const *rect
);
gog_renderer_stroke_serie ()
void gog_renderer_stroke_serie (GogRenderer *renderer
,GOPath const *path
);
gog_renderer_stroke_shape ()
void gog_renderer_stroke_shape (GogRenderer *renderer
,GOPath const *path
);
gog_renderer_update ()
gboolean gog_renderer_update (GogRenderer *renderer
,double w
,double h
);
Requests a renderer update, only useful for pixbuf based renderer.