| Top |
| enum | GoJustification |
| #define | GOG_RENDERER_GRIP_SIZE |
| #define | GOG_RENDERER_HAIRLINE_WIDTH_PTS |
Note that GogGraph has a functions for export/rendering, so you do not always need to use a GogRenderer directly.
void gog_renderer_draw_circle (GogRenderer *rend,double x,double y,double r);
void gog_renderer_draw_color_map (GogRenderer *rend,GogAxisColorMap const *map,int discrete,gboolean horizontal,GogViewAllocation const *rect);
void gog_renderer_draw_data_label (GogRenderer *rend,GogSeriesLabelElt const *elt,GogViewAllocation const *pos,GOAnchorType anchor,GOStyle *legend_style);
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.
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. |
void gog_renderer_draw_grip (GogRenderer *renderer,double x,double y);
Draw a grip, used for moving/resizing of objects.
void gog_renderer_draw_rectangle (GogRenderer *rend,GogViewAllocation const *rect);
A utility routine to build a closed rectangle vpath.
void gog_renderer_draw_rotated_rectangle (GogRenderer *rend,GogViewAllocation const *rect,gboolean rotate_bg);
void gog_renderer_draw_selection_rectangle (GogRenderer *renderer,GogViewAllocation const *rectangle);
void gog_renderer_draw_shape (GogRenderer *renderer,GOPath const *path);
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.
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. |
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()).
renderer |
||
format |
image format for export |
|
output |
a GsfOutput stream |
|
x_dpi |
x resolution of exported graph |
|
y_dpi |
y resolution of exported graph |
void gog_renderer_fill_circle (GogRenderer *rend,double x,double y,double r);
void gog_renderer_fill_rectangle (GogRenderer *rend,GogViewAllocation const *rect);
void gog_renderer_fill_serie (GogRenderer *renderer,GOPath const *path,GOPath const *close_path);
void gog_renderer_fill_shape (GogRenderer *renderer,GOPath const *path);
cairo_surface_t *
gog_renderer_get_cairo_surface (GogRenderer *renderer);
void gog_renderer_get_gostring_AABR (GogRenderer *rend,GOString *str,GOGeometryAABR *aabr,double max_width);
rend |
||
str |
the string to draw |
|
aabr |
GOGeometryAABR to store the Axis Aligned Bounding Rectangle of |
void gog_renderer_get_gostring_OBR (GogRenderer *rend,GOString *str,GOGeometryOBR *obr,double max_width);
rend |
||
str |
the string to draw |
|
obr |
GOGeometryOBR to store the Object Bounding Rectangle of |
double
gog_renderer_get_hairline_width_pts (GogRenderer const *rend);
void gog_renderer_get_text_AABR (GogRenderer *rend,char const *text,gboolean use_markup,GOGeometryAABR *aabr,double max_width);
rend |
||
text |
the string to draw |
|
use_markup |
whether to use pango markup |
|
aabr |
GOGeometryAABR to store the Axis Aligned Bounding Rectangle of |
void gog_renderer_get_text_OBR (GogRenderer *rend,char const *text,gboolean use_markup,GOGeometryOBR *obr,double max_width);
rend |
||
text |
the string to draw |
|
use_markup |
wether to use pango markup |
|
obr |
GOGeometryOBR to store the Object Bounding Rectangle of |
void gog_renderer_push_clip (GogRenderer *rend,GOPath const *path);
Defines the current clipping region.
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.
gboolean gog_renderer_render_to_cairo (GogRenderer *renderer,cairo_t *cairo,double width,double height);
void gog_renderer_stroke_circle (GogRenderer *rend,double x,double y,double r);
void gog_renderer_stroke_rectangle (GogRenderer *rend,GogViewAllocation const *rect);
void gog_renderer_stroke_serie (GogRenderer *renderer,GOPath const *path);
void gog_renderer_stroke_shape (GogRenderer *renderer,GOPath const *path);
gboolean gog_renderer_update (GogRenderer *renderer,double w,double h);
Requests a renderer update, only useful for pixbuf based renderer.