GOffice.GraphRenderer¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
The |
||
r |
the |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Fields¶
- Inherited:
Class Details¶
- class GOffice.GraphRenderer(**kwargs)¶
- Bases:
- Abstract:
No
- classmethod new(graph)¶
- Parameters:
graph (
GOffice.GraphGraph
) – graph model- Returns:
a new
GOffice.GraphRenderer
which can render into a pixbuf, and sets graph as its model.- Return type:
- draw_color_map(map, discrete, horizontal, rect)¶
- Parameters:
map (
GOffice.GraphAxisColorMap
) –discrete (
int
) –horizontal (
bool
) –rect (
GOffice.GraphViewAllocation
) –
- draw_data_label(elt, pos, anchor, legend_style)¶
- Parameters:
elt (
GOffice.GraphSeriesLabelElt
) –pos (
GOffice.GraphViewAllocation
) –anchor (
GOffice.AnchorType
) –legend_style (
GOffice.Style
) –
- draw_gostring(str, pos, anchor, justification, width)¶
- Parameters:
str (
GOffice.String
) – theGOffice.String
to drawpos (
GOffice.GraphViewAllocation
) –GOffice.GraphViewAllocation
anchor (
GOffice.AnchorType
) –GOffice.AnchorType
how to draw relative to posjustification (
GOffice.Justification
) –GOffice.Justification
for 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.
- draw_grip(x, y)¶
-
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
) –
- 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 drawpos (
GOffice.GraphViewAllocation
) –GOffice.GraphViewAllocation
anchor (
GOffice.AnchorType
) –GOffice.AnchorType
how to draw relative to posuse_markup (
bool
) – wether to use pango markupjustification (
GOffice.Justification
) –GOffice.Justification
for 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.
- export_image(format, output, x_dpi, y_dpi)¶
- Parameters:
format (
GOffice.ImageFormat
) – image format for exportoutput (
Gsf.Output
) – aGsf.Output
streamx_dpi (
float
) – x resolution of exported graphy_dpi (
float
) – y resolution of exported graph
- Returns:
True
if export succeed.- Return type:
Exports an image of graph in given format, writing results in a
Gsf.Output
stream. If export format type is a bitmap one, it computes image size with x_dpi, y_dpi and graph size (seeGOffice.GraphGraph.get_size
()).
- fill_rectangle(rect)¶
- Parameters:
rect (
GOffice.GraphViewAllocation
) –
- fill_serie(path, close_path)¶
- Parameters:
path (
GOffice.Path
) –close_path (
GOffice.Path
) –
- fill_shape(path)¶
- Parameters:
path (
GOffice.Path
) –
- get_cairo_surface()¶
- Return type:
- get_gostring_AABR(str, aabr, max_width)¶
- Parameters:
str (
GOffice.String
) – the string to drawaabr (
GOffice.GeometryAABR
) –GOffice.GeometryAABR
to store the Axis Aligned Bounding Rectangle of text.max_width (
float
) – maximum width or -1 for unrestricted
- get_gostring_OBR(str, obr, max_width)¶
- Parameters:
str (
GOffice.String
) – the string to drawobr (
GOffice.GeometryOBR
) –GOffice.GeometryOBR
to store the Object Bounding Rectangle of text.max_width (
float
) – maximum width or -1 for unrestricted
- get_pixbuf()¶
- Returns:
current pixbuf buffer from a renderer that can render into a pixbuf. or
None
on error.- Return type:
- get_text_AABR(text, use_markup, aabr, max_width)¶
- Parameters:
text (
str
) – the string to drawuse_markup (
bool
) – whether to use pango markupaabr (
GOffice.GeometryAABR
) –GOffice.GeometryAABR
to store the Axis Aligned Bounding Rectangle of text.max_width (
float
) – maximum width or -1 for unrestricted
- get_text_OBR(text, use_markup, obr, max_width)¶
- Parameters:
text (
str
) – the string to drawuse_markup (
bool
) – wether to use pango markupobr (
GOffice.GeometryOBR
) –GOffice.GeometryOBR
to store the Object Bounding Rectangle of text.max_width (
float
) – maximum width or -1 for unrestricted
- pop_clip()¶
End the current clipping.
- pop_style()¶
- push_clip(path)¶
- Parameters:
path (
GOffice.Path
) – aGOffice.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:
- request_update()¶
- stroke_rectangle(rect)¶
- Parameters:
rect (
GOffice.GraphViewAllocation
) –
- stroke_serie(path)¶
- Parameters:
path (
GOffice.Path
) –
- stroke_shape(path)¶
- Parameters:
path (
GOffice.Path
) –
Signal Details¶
- GOffice.GraphRenderer.signals.request_update(graph_renderer)¶
- Signal Name:
request-update
- Flags:
- Parameters:
graph_renderer (
GOffice.GraphRenderer
) – The object which received the signal
Property Details¶
- GOffice.GraphRenderer.props.model¶
- Name:
model
- Type:
- Default Value:
- Flags:
The
GOffice.GraphGraph
this renderer displays
- GOffice.GraphRenderer.props.view¶
- Name:
view
- Type:
- Default Value:
- Flags:
the
GOffice.GraphView
this renderer is displaying