![]() |
![]() |
![]() |
Goffice Reference Manual | ![]() |
---|---|---|---|---|
gboolean gog_graph_validate_chart_layout (GogGraph *graph); unsigned gog_graph_num_cols (GogGraph const *graph); unsigned gog_graph_num_rows (GogGraph const *graph); GogGraph* gog_graph_dup (GogGraph const *graph); GogTheme* gog_graph_get_theme (GogGraph const *graph); void gog_graph_set_theme (GogGraph *graph, GogTheme *theme); GSList* gog_graph_get_data (GogGraph const *graph); GOData* gog_graph_ref_data (GogGraph *graph, GOData *dat); void gog_graph_unref_data (GogGraph *graph, GOData *dat); void gog_graph_get_size (GogGraph *graph, double *width, double *height); void gog_graph_set_size (GogGraph *graph, double width, double height); #define GOG_TYPE_GRAPH_VIEW #define GOG_GRAPH_VIEW (o) #define GOG_IS_GRAPH_VIEW (o) GType gog_graph_view_get_type (void); GogView* gog_graph_view_get_selection (GogGraphView *gview); void gog_graph_view_set_selection (GogGraphView *gview, GogObject *gobj); GSList* gog_graph_get_supported_image_formats (void); gboolean gog_graph_export_image (GogGraph *graph, GOImageFormat format, GsfOutput *output, double x_dpi, double y_dpi); void gog_graph_view_handle_event (GogGraphView *gview, GdkEvent *event, double x_offset, double y_offset); void gog_graph_render_to_cairo (GogGraph *graph, cairo_t *cairo, double w, double h);
gboolean gog_graph_validate_chart_layout (GogGraph *graph);
Check the layout of the chart grid and ensure that there are no empty cols or rows, and resize as necessary
|
GogGraph |
Returns : |
TRUE if anything changed.
|
GogGraph* gog_graph_dup (GogGraph const *graph);
|
GogGraph |
Returns : |
a deep copy of graph .
|
GSList* gog_graph_get_data (GogGraph const *graph);
|
GogGraph |
Returns : |
a list of the GOData objects that are data to the graph. The caller should _not_ modify or free the list. |
GOData* gog_graph_ref_data (GogGraph *graph, GOData *dat);
|
GogGraph |
|
GOData |
Returns : |
dat or something equivalent to it that already exists in the graph.
Otherwise use dat . Adds a gobject ref to the target and increments a
count of the number of refs made from this GogGraph.
|
void gog_graph_unref_data (GogGraph *graph, GOData *dat);
|
GogGraph |
|
GOData |
void gog_graph_get_size (GogGraph *graph, double *width, double *height);
FIXME Returns the logical size of graph, in points.
|
GogGraph |
|
logical width in pts |
|
logical height in pts |
void gog_graph_set_size (GogGraph *graph, double width, double height);
Sets the logical size of graph, given in points.
|
GogGraph |
|
logical width in pts |
|
logical height in pts |
#define GOG_GRAPH_VIEW(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GOG_TYPE_GRAPH_VIEW, GogGraphView))
|
#define GOG_IS_GRAPH_VIEW(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GOG_TYPE_GRAPH_VIEW))
|
GogView* gog_graph_view_get_selection (GogGraphView *gview);
|
GogGraphView |
Returns : |
current selected view. |
void gog_graph_view_set_selection (GogGraphView *gview, GogObject *gobj);
Sets gobj
as current selection. If gobj
is different from previously
selected object, a selection-changed signal is emitted.
|
GogGraphView |
|
new selected object |
GSList* gog_graph_get_supported_image_formats (void);
Builds a list of supported formats for image export.
Returns : |
a GSList of GOImageFormat. |
gboolean gog_graph_export_image (GogGraph *graph, 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()
).
|
a GogGraph |
|
image format for export |
|
a GsfOutput stream |
|
x resolution of exported graph |
|
y resolution of exported graph |
Returns : |
TRUE if export succeed.
|
void gog_graph_view_handle_event (GogGraphView *gview, GdkEvent *event, double x_offset, double y_offset);
Handle events.
|
GogGraphView |
|
GdkEvent |
|
in pixels |
|
in pixels |
void gog_graph_render_to_cairo (GogGraph *graph, cairo_t *cairo, double w, double h);
Renders a graph using cairo
. w
and h
are the requested width an height of the rendered graph, in the current cairo
coordinate space. This function is not suited for multiple rendering of the same graph. gog_renderer_render_to cairo or gog_renderer_update/gog_renderer_get_cairo_surface should be used instead.
|
a GogGraph |
|
a cairo context |
|
width |
|
height |