GOffice.GraphRenderer¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | GObject.Object (37) | 
|---|---|
| Structs: | GObject.ObjectClass (5) | 
| class | new(graph) | 
| draw_circle(x, y, r) | |
| draw_color_map(map, discrete, horizontal, rect) | |
| draw_data_label(elt, pos, anchor, legend_style) | |
| draw_gostring(str, pos, anchor, justification, width) | |
| draw_grip(x, y) | |
| draw_marker(x, y) | |
| draw_rectangle(rect) | |
| draw_rotated_rectangle(rect, rotate_bg) | |
| draw_selection_rectangle(rectangle) | |
| draw_shape(path) | |
| draw_text(text, pos, anchor, use_markup, justification, width) | |
| export_image(format, output, x_dpi, y_dpi) | |
| fill_circle(x, y, r) | |
| fill_rectangle(rect) | |
| fill_serie(path, close_path) | |
| fill_shape(path) | |
| get_cairo_surface() | |
| get_gostring_AABR(str, aabr, max_width) | |
| get_gostring_OBR(str, obr, max_width) | |
| get_hairline_width_pts() | |
| get_pixbuf() | |
| get_scale() | |
| get_text_AABR(text, use_markup, aabr, max_width) | |
| get_text_OBR(text, use_markup, obr, max_width) | |
| line_size(width) | |
| pop_clip() | |
| pop_style() | |
| pt2r(d) | |
| pt2r_x(d) | |
| pt2r_y(d) | |
| push_clip(path) | |
| push_clip_rectangle(x, y, w, h) | |
| push_style(style) | |
| render_to_cairo(cairo, width, height) | |
| request_update() | |
| stroke_circle(x, y, r) | |
| stroke_rectangle(rect) | |
| stroke_serie(path) | |
| stroke_shape(path) | |
| update(w, h) | 
Virtual Methods¶
| Inherited: | GObject.Object (7) | 
|---|
Properties¶
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| model | GOffice.GraphGraph | r/w | The GOffice.GraphGraphthis renderer displays | 
| view | GOffice.GraphView | r | the GOffice.GraphViewthis renderer is displaying | 
Fields¶
| Inherited: | GObject.Object (1) | 
|---|
Class Details¶
- 
class GOffice.GraphRenderer(**kwargs)¶
- Bases: - GObject.Object- Abstract: - No - 
classmethod new(graph)¶
- Parameters: - graph ( - GOffice.GraphGraph) – graph model- Returns: - a new - GOffice.GraphRendererwhich can render into a pixbuf, and sets graph as its model.- Return type: - GOffice.GraphRenderer
 - 
draw_color_map(map, discrete, horizontal, rect)¶
- Parameters: - map (GOffice.GraphAxisColorMap) –
- discrete (int) –
- horizontal (bool) –
- rect (GOffice.GraphViewAllocation) –
 
- map (
 - 
draw_data_label(elt, pos, anchor, legend_style)¶
- Parameters: - elt (GOffice.GraphSeriesLabelElt) –
- pos (GOffice.GraphViewAllocation) –
- anchor (GOffice.AnchorType) –
- legend_style (GOffice.Style) –
 
- elt (
 - 
draw_gostring(str, pos, anchor, justification, width)¶
- Parameters: - str (GOffice.String) – theGOffice.Stringto draw
- pos (GOffice.GraphViewAllocation) –GOffice.GraphViewAllocation
- anchor (GOffice.AnchorType) –GOffice.AnchorTypehow to draw relative to pos
- justification (GOffice.Justification) –GOffice.Justificationfor multiline string.
- width (float) – if positive, the maximum width to get a multiline string if needed.
 - Have self 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. 
- str (
 - 
draw_grip(x, y)¶
- Parameters: - Draw a grip, used for moving/resizing of objects. 
 - 
draw_rectangle(rect)¶
- Parameters: - rect ( - GOffice.GraphViewAllocation) – position and extent of rectangle- A utility routine to build a closed rectangle vpath. 
 - 
draw_rotated_rectangle(rect, rotate_bg)¶
- Parameters: - rect (GOffice.GraphViewAllocation) –
- rotate_bg (bool) –
 
- rect (
 - 
draw_selection_rectangle(rectangle)¶
- Parameters: - rectangle ( - GOffice.GraphViewAllocation) –
 - 
draw_shape(path)¶
- Parameters: - path ( - GOffice.Path) –
 - 
draw_text(text, pos, anchor, use_markup, justification, width)¶
- Parameters: - text (str) – the string to draw
- pos (GOffice.GraphViewAllocation) –GOffice.GraphViewAllocation
- anchor (GOffice.AnchorType) –GOffice.AnchorTypehow to draw relative to pos
- use_markup (bool) – wether to use pango markup
- justification (GOffice.Justification) –GOffice.Justificationfor multiline text.
- width (float) – if positive, the maximum width to get a multiline text if needed.
 - Have self 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. 
- text (
 - 
export_image(format, output, x_dpi, y_dpi)¶
- Parameters: - format (GOffice.ImageFormat) – image format for export
- output (Gsf.Output) – aGsf.Outputstream
- x_dpi (float) – x resolution of exported graph
- y_dpi (float) – y resolution of exported graph
 - Returns: - Trueif export succeed.- Return type: - Exports an image of graph in given format, writing results in a - Gsf.Outputstream. If export format type is a bitmap one, it computes image size with x_dpi, y_dpi and graph size (see- GOffice.GraphGraph.get_size()).
- format (
 - 
fill_rectangle(rect)¶
- Parameters: - rect ( - GOffice.GraphViewAllocation) –
 - 
fill_serie(path, close_path)¶
- Parameters: - path (GOffice.Path) –
- close_path (GOffice.Path) –
 
- path (
 - 
fill_shape(path)¶
- Parameters: - path ( - GOffice.Path) –
 - 
get_cairo_surface()¶
- Return type: - cairo.Surface
 - 
get_gostring_AABR(str, aabr, max_width)¶
- Parameters: - str (GOffice.String) – the string to draw
- aabr (GOffice.GeometryAABR) –GOffice.GeometryAABRto store the Axis Aligned Bounding Rectangle of text.
- max_width (float) – maximum width or -1 for unrestricted
 
- str (
 - 
get_gostring_OBR(str, obr, max_width)¶
- Parameters: - str (GOffice.String) – the string to draw
- obr (GOffice.GeometryOBR) –GOffice.GeometryOBRto store the Object Bounding Rectangle of text.
- max_width (float) – maximum width or -1 for unrestricted
 
- str (
 - 
get_pixbuf()¶
- Returns: - current pixbuf buffer from a renderer that can render into a pixbuf. or - Noneon error.- Return type: - GdkPixbuf.Pixbuf
 - 
get_text_AABR(text, use_markup, aabr, max_width)¶
- Parameters: - text (str) – the string to draw
- use_markup (bool) – whether to use pango markup
- aabr (GOffice.GeometryAABR) –GOffice.GeometryAABRto store the Axis Aligned Bounding Rectangle of text.
- max_width (float) – maximum width or -1 for unrestricted
 
- text (
 - 
get_text_OBR(text, use_markup, obr, max_width)¶
- Parameters: - text (str) – the string to draw
- use_markup (bool) – wether to use pango markup
- obr (GOffice.GeometryOBR) –GOffice.GeometryOBRto store the Object Bounding Rectangle of text.
- max_width (float) – maximum width or -1 for unrestricted
 
- text (
 - 
pop_clip()¶
- End the current clipping. 
 - 
pop_style()¶
 - 
push_clip(path)¶
- Parameters: - path ( - GOffice.Path) – a- GOffice.Path- Defines the current clipping region. 
 - 
push_clip_rectangle(x, y, w, h)¶
- Parameters: - Defines a rectangular clipping region. For efficient screen rendering, this function takes care to round the coordinates. 
 - 
push_style(style)¶
- Parameters: - style ( - GOffice.Style) –
 - 
render_to_cairo(cairo, width, height)¶
- Parameters: - cairo (cairo.Context) –
- width (float) –
- height (float) –
 - Return type: 
- cairo (
 - 
request_update()¶
 - 
stroke_rectangle(rect)¶
- Parameters: - rect ( - GOffice.GraphViewAllocation) –
 - 
stroke_serie(path)¶
- Parameters: - path ( - GOffice.Path) –
 - 
stroke_shape(path)¶
- Parameters: - path ( - GOffice.Path) –
 
- 
classmethod 
Signal Details¶
- 
GOffice.GraphRenderer.signals.request_update(graph_renderer)¶
- Signal Name: - request-update- Flags: - RUN_LAST- Parameters: - graph_renderer ( - GOffice.GraphRenderer) – The object which received the signal
Property Details¶
- 
GOffice.GraphRenderer.props.model¶
- Name: - model- Type: - GOffice.GraphGraph- Default Value: - None- Flags: - READABLE,- WRITABLE- The - GOffice.GraphGraphthis renderer displays
- 
GOffice.GraphRenderer.props.view¶
- Name: - view- Type: - GOffice.GraphView- Default Value: - None- Flags: - READABLE- the - GOffice.GraphViewthis renderer is displaying