![]() |
![]() |
![]() |
Goffice Reference Manual | ![]() |
---|---|---|---|---|
GogRenderer; void gog_renderer_request_update (GogRenderer *r); void gog_renderer_push_style (GogRenderer *rend, GogStyle const *style); void gog_renderer_push_selection_style (GogRenderer *renderer); void gog_renderer_pop_style (GogRenderer *rend); void gog_renderer_push_clip (GogRenderer *rend, ArtVpath *clip_path); void gog_renderer_pop_clip (GogRenderer *rend); ArtVpath* gog_renderer_get_rectangle_vpath (GogViewAllocation const *rect); ArtBpath* gog_renderer_get_ring_wedge_bpath (double cx, double cy, double rx_out, double ry_out, double rx_in, double ry_in, double th0, double th1); void gog_renderer_draw_sharp_path (GogRenderer *rend, ArtVpath *path); void gog_renderer_draw_sharp_polygon (GogRenderer *rend, ArtVpath *path, gboolean narrow); void gog_renderer_draw_sharp_rectangle (GogRenderer *r, GogViewAllocation const *rect); void gog_renderer_draw_ring_wedge (GogRenderer *rend, double cx, double cy, double rx_out, double ry_out, double rx_in, double ry_in, double th0, double th1, gboolean narrow); void gog_renderer_draw_path (GogRenderer *rend, ArtVpath const *path); void gog_renderer_draw_polygon (GogRenderer *rend, ArtVpath const *path, gboolean narrow); void gog_renderer_draw_rectangle (GogRenderer *rend, GogViewAllocation const *rect); void gog_renderer_draw_bezier_path (GogRenderer *rend, ArtBpath const *path); void gog_renderer_draw_text (GogRenderer *rend, char const *text, GogViewAllocation const *pos, GtkAnchorType anchor, gboolean use_markup); void gog_renderer_draw_marker (GogRenderer *rend, double x, double y); void gog_renderer_draw_grip (GogRenderer *renderer, double x, double y); #define gog_renderer_in_grip (x,y,grip_x,grip_y) void gog_renderer_get_text_OBR (GogRenderer *rend, char const *text, gboolean use_markup, GOGeometryOBR *obr); void gog_renderer_get_text_AABR (GogRenderer *rend, char const *text, gboolean use_markup, GOGeometryAABR *aabr); #define gog_renderer_draw_arc (r,cx,cy,rx,ry,th0,th1) #define gog_renderer_draw_pie_wedge (r,cx,cy,rx,ry,th0,th1,narrow) double gog_renderer_line_size (GogRenderer const *r, double width); double gog_renderer_pt2r_x (GogRenderer const *r, double d); double gog_renderer_pt2r_y (GogRenderer const *r, double d); double gog_renderer_pt2r (GogRenderer const *r, double d); GogRenderer* gog_renderer_new_for_pixbuf (GogGraph *graph); GogRenderer* gog_renderer_new_for_format (GogGraph *graph, GOImageFormat format); gboolean gog_renderer_export_image (GogRenderer *renderer, GOImageFormat format, GsfOutput *output, double x_dpi, double y_dpi); gboolean gog_renderer_update (GogRenderer *renderer, double w, double h, double zoom); GdkPixbuf* gog_renderer_get_pixbuf (GogRenderer *renderer); void gog_graph_print_to_gnome_print (GogGraph *graph, GnomePrintContext *gp_context, double width, double height);
void gog_renderer_push_style (GogRenderer *rend, GogStyle const *style);
rend : |
|
style : |
void gog_renderer_push_selection_style (GogRenderer *renderer);
Push a style used for selection and grip rendering.
renderer : |
GogRenderer |
void gog_renderer_push_clip (GogRenderer *rend, ArtVpath *clip_path);
Defines the current clipping region.
rend : |
GogRenderer |
clip_path : |
ArtVpath array |
void gog_renderer_pop_clip (GogRenderer *rend);
End the current clipping.
rend : |
GogRenderer |
ArtVpath* gog_renderer_get_rectangle_vpath (GogViewAllocation const *rect);
a utility routine to build a rectangle path.
rect : |
|
Returns : |
ArtBpath* gog_renderer_get_ring_wedge_bpath (double cx, double cy, double rx_out, double ry_out, double rx_in, double ry_in, double th0, double th1);
cx : |
|
cy : |
|
rx_out : |
|
ry_out : |
|
rx_in : |
|
ry_in : |
|
th0 : |
|
th1 : |
|
Returns : |
void gog_renderer_draw_sharp_path (GogRenderer *rend, ArtVpath *path);
Draws path
using the outline elements of the current style,
trying to make line with sharp edge.
rend : |
GogRenderer |
path : |
ArtVpath |
void gog_renderer_draw_sharp_polygon (GogRenderer *rend, ArtVpath *path, gboolean narrow);
Draws path
and fills it with the fill elements of the current style,
trying to draw line with sharp edge.
If narrow
is false it alos outlines it using the outline elements.
rend : |
GogRenderer |
path : |
ArtVpath |
narrow : |
if TRUE skip any outline the current style specifies. |
void gog_renderer_draw_sharp_rectangle (GogRenderer *r, GogViewAllocation const *rect);
r : |
|
rect : |
void gog_renderer_draw_ring_wedge (GogRenderer *rend, double cx, double cy, double rx_out, double ry_out, double rx_in, double ry_in, double th0, double th1, gboolean narrow);
a utility routine to draw an arc.
rend : |
GogRenderer |
cx : |
center x coordinate |
cy : |
center y coordinate |
rx_out : |
x radius |
ry_out : |
y radius |
rx_in : |
|
ry_in : |
|
th0 : |
start arc angle |
th1 : |
stop arc angle |
narrow : |
void gog_renderer_draw_path (GogRenderer *rend, ArtVpath const *path);
Draws path
using the outline elements of the current style.
rend : |
GogRenderer |
path : |
ArtVpath |
void gog_renderer_draw_polygon (GogRenderer *rend, ArtVpath const *path, gboolean narrow);
Draws path
and fills it with the fill elements of the current style.
If narrow
is false it alos outlines it using the outline elements.
rend : |
GogRenderer |
path : |
ArtVpath |
narrow : |
if TRUE skip any outline the current style specifies. |
void gog_renderer_draw_rectangle (GogRenderer *rend, GogViewAllocation const *rect);
A utility routine to build a closed rectangle vpath.
rend : |
a GogRenderer |
rect : |
position and extent of rectangle |
void gog_renderer_draw_bezier_path (GogRenderer *rend, ArtBpath const *path);
Draws path
using the outline elements of the current style.
rend : |
GogRenderer |
path : |
ArtBpath |
void gog_renderer_draw_text (GogRenderer *rend, char const *text, GogViewAllocation const *pos, GtkAnchorType anchor, gboolean use_markup);
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 : |
GogRenderer |
text : |
the string to draw |
pos : |
GogViewAllocation |
anchor : |
GtkAnchorType how to draw relative to pos
|
use_markup : |
wether to use pango markup |
void gog_renderer_draw_marker (GogRenderer *rend, double x, double y);
rend : |
GogRenderer |
x : |
X-coordinate |
y : |
Y-coordinate |
void gog_renderer_draw_grip (GogRenderer *renderer, double x, double y);
Draw a grip, used for moving/resizing of objects.
renderer : |
GogRenderer |
x : |
x position of grip |
y : |
y position of grip |
void gog_renderer_get_text_OBR (GogRenderer *rend, char const *text, gboolean use_markup, GOGeometryOBR *obr);
rend : |
GogRenderer |
text : |
the string to draw |
use_markup : |
wether to use pango markup |
obr : |
GOGeometryOBR to store the Object Bounding Rectangle of text .
|
void gog_renderer_get_text_AABR (GogRenderer *rend, char const *text, gboolean use_markup, GOGeometryAABR *aabr);
rend : |
GogRenderer |
text : |
the string to draw |
use_markup : |
wether to use pango markup |
aabr : |
GOGeometryAABR to store the Axis Aligned Bounding Rectangle of text .
|
#define gog_renderer_draw_arc(r,cx,cy,rx,ry,th0,th1)
r : |
|
cx : |
|
cy : |
|
rx : |
|
ry : |
|
th0 : |
|
th1 : |
#define gog_renderer_draw_pie_wedge(r,cx,cy,rx,ry,th0,th1,narrow)
r : |
|
cx : |
|
cy : |
|
rx : |
|
ry : |
|
th0 : |
|
th1 : |
|
narrow : |
double gog_renderer_line_size (GogRenderer const *r, double width);
r : |
|
width : |
|
Returns : |
double gog_renderer_pt2r_x (GogRenderer const *r, double d);
r : |
|
d : |
|
Returns : |
double gog_renderer_pt2r_y (GogRenderer const *r, double d);
r : |
|
d : |
|
Returns : |
GogRenderer* gog_renderer_new_for_pixbuf (GogGraph *graph);
Creates a new renderer which can render into a pixbuf, and sets
graph
as its model.
graph : |
graph model |
Returns : |
GogRenderer* gog_renderer_new_for_format (GogGraph *graph, GOImageFormat format);
Creates a new GogRenderer which is capable of export to format
.
graph : |
a GogGraph |
format : |
image format |
Returns : | a new GogRenderer. |
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 : |
a GogRenderer |
format : |
image format for export |
output : |
a GsfOutput stream |
x_dpi : |
x resolution of exported graph |
y_dpi : |
y resolution of exported graph |
Returns : | TRUE if export succeed.
|
gboolean gog_renderer_update (GogRenderer *renderer, double w, double h, double zoom);
Requests a renderer update, only useful for pixbuf based renderer.
renderer : |
a GogRenderer |
w : |
requested width |
h : |
requested height |
zoom : |
requested zoom |
Returns : |
GdkPixbuf* gog_renderer_get_pixbuf (GogRenderer *renderer);
renderer : |
GogRenderer |
Returns : | current pixbuf buffer from a renderer that can render into a pixbuf. |
void gog_graph_print_to_gnome_print (GogGraph *graph, GnomePrintContext *gp_context, double width, double height);
graph : |
|
gp_context : |
|
width : |
|
height : |
"request-update"
signalvoid user_function (GogRenderer *gogrenderer, gpointer user_data) : Run Last
gogrenderer : |
the object which received the signal. |
user_data : |
user data set when the signal handler was connected. |