GOffice.Path¶
Fields¶
None
Methods¶
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class GOffice.Path¶
- classmethod new()¶
- Return type:
- classmethod new_from_odf_enhanced_path(src, variables)¶
- Parameters:
- Returns:
the newly allocated
GOffice.PathorNoneon error.- Return type:
GOffice.PathorNone
- classmethod new_from_svg(src)¶
- Parameters:
- Returns:
the newly allocated
GOffice.Path.- Return type:
GOffice.PathorNone
- arc(cx, cy, rx, ry, th0, th1)¶
- arc_to(cx, cy, rx, ry, th0, th1)¶
- clear()¶
- close()¶
- copy()¶
- Returns:
a new
GOffice.Pathidentical to self.- Return type:
GOffice.PathorNone
- copy_restricted(start, end)¶
- Parameters:
- Returns:
a new
GOffice.Path.- Return type:
Copies actions between start and end will be copied inside a new
GOffice.Path. If start or end is negative, it is not taken into account.New in version 0.10.5.
- curve_to(x0, y0, x1, y1, x2, y2)¶
- free()¶
Decrements references
GOffice.countand frees all memory allocated for self if referencesGOffice.countreaches 0.
- get_options()¶
- Return type:
- interpret(direction, move_to, line_to, curve_to, close_path, closure)¶
- Parameters:
direction (
GOffice.PathDirection) –GOffice.PathDirectionmove_to (
GOffice.PathMoveToFunc) – the callback for move to.line_to (
GOffice.PathLineToFunc) – the callback for drawing a line.curve_to (
GOffice.PathCurveToFunc) – the callback for drawing a bezier cubic spline.close_path (
GOffice.PathClosePathFunc) – the callback for closing the path.closure (
objectorNone) – data to pass as first argument to the callbacks.
This function can be used to draw a path or for other purposes. To draw using cairo, the closure argument should be a valid
cairo.Context.
- interpret_full(start, end, direction, move_to, line_to, curve_to, close_path, closure)¶
- Parameters:
start (
int) – index of the first action to interpretend (
int) – index of the last action to interpretdirection (
GOffice.PathDirection) –GOffice.PathDirectionmove_to (
GOffice.PathMoveToFunc) – the callback for move to.line_to (
GOffice.PathLineToFunc) – the callback for drawing a line.curve_to (
GOffice.PathCurveToFunc) – the callback for drawing a bezier cubic spline.close_path (
GOffice.PathClosePathFunc) – the callback for closing the path.closure (
objectorNone) – data to pass as first argument to the callbacks.
This function can be used to draw a portion path or for other purposes. Only actions between start and end will be executed. If start or end is negative, it is not taken into account.
New in version 0.10.5.
- pie_wedge(cx, cy, rx, ry, th0, th1)¶
- rectangle(x, y, width, height)¶
- ref()¶
- Returns:
the path with an incremented references
GOffice.count.- Return type:
Increments references
GOffice.countto self.
- ring_wedge(cx, cy, rx_out, ry_out, rx_in, ry_in, th0, th1)¶
- scale(scale_x, scale_y)¶
- Parameters:
- Returns:
the scaled path.
- Return type:
Builds a scaled.
- set_options(options)¶
- Parameters:
options (
GOffice.PathOptions) –GOffice.PathOptions
Change the rendering options for self using
GOffice.PathOptions.SNAP_COORDINATESGOffice.PathOptions.SNAP_WIDTHGOffice.PathOptions.SHARP
- to_cairo(direction, cr)¶
- Parameters:
direction (
GOffice.PathDirection) –GOffice.PathDirectioncr (
cairo.Context) –cairo.Context
Renders the path to the cairo context using its current settings.