GOffice.Path¶
Fields¶
None
Methods¶
| class | new() | 
| class | new_from_odf_enhanced_path(src, variables) | 
| class | new_from_svg(src) | 
| append(path2) | |
| arc(cx, cy, rx, ry, th0, th1) | |
| arc_to(cx, cy, rx, ry, th0, th1) | |
| clear() | |
| close() | |
| copy() | |
| copy_restricted(start, end) | |
| curve_to(x0, y0, x1, y1, x2, y2) | |
| free() | |
| get_options() | |
| interpret(direction, move_to, line_to, curve_to, close_path, closure) | |
| interpret_full(start, end, direction, move_to, line_to, curve_to, close_path, closure) | |
| line_to(x, y) | |
| move_to(x, y) | |
| pie_wedge(cx, cy, rx, ry, th0, th1) | |
| rectangle(x, y, width, height) | |
| ref() | |
| ring_wedge(cx, cy, rx_out, ry_out, rx_in, ry_in, th0, th1) | |
| scale(scale_x, scale_y) | |
| set_options(options) | |
| to_cairo(direction, cr) | |
| to_svg() | 
Details¶
- 
class GOffice.Path¶
- 
classmethod new()¶
- Return type: - GOffice.Path
 - 
classmethod new_from_odf_enhanced_path(src, variables)¶
- Parameters: - Returns: - the newly allocated - GOffice.Pathor- Noneon error.- Return type: 
 - 
classmethod new_from_svg(src)¶
- Parameters: - src ( - str) – an SVG path.- Returns: - the newly allocated - GOffice.Path.- Return type: - GOffice.Path
 - 
append(path2)¶
- Parameters: - path2 ( - GOffice.Path) –- GOffice.Path- Returns: - self - Return type: - GOffice.Path- Appends path2 at the end of self. 
 - 
arc(cx, cy, rx, ry, th0, th1)¶
- Parameters: 
 - 
arc_to(cx, cy, rx, ry, th0, th1)¶
- Parameters: 
 - 
clear()¶
 - 
close()¶
 - 
copy()¶
- Returns: - a new - GOffice.Pathidentical to self.- Return type: - GOffice.Path
 - 
copy_restricted(start, end)¶
- Parameters: - Returns: - a new - GOffice.Path. If start or end is negative, it is not taken into account.- Return type: - Copies actions between start and end will be copied inside a new - GOffice.Path.- New in version 0.10.5. 
 - 
curve_to(x0, y0, x1, y1, x2, y2)¶
- Parameters: 
 - 
free()¶
- Decrements references - GOffice.countand frees all memory allocated for self if references- GOffice.countreaches 0.
 - 
get_options()¶
- Return type: - GOffice.PathOptions
 - 
interpret(direction, move_to, line_to, curve_to, close_path, closure)¶
- Parameters: - direction (GOffice.PathDirection) –GOffice.PathDirection
- move_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.
- direction (
 - 
interpret_full(start, end, direction, move_to, line_to, curve_to, close_path, closure)¶
- Parameters: - start (int) – index of the first action to interpret
- end (int) – index of the last action to interpret
- direction (GOffice.PathDirection) –GOffice.PathDirection
- move_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. 
- start (
 - 
pie_wedge(cx, cy, rx, ry, th0, th1)¶
- Parameters: 
 - 
rectangle(x, y, width, height)¶
- Parameters: 
 - 
ref()¶
- Returns: - the path with an incremented references - GOffice.count.- Return type: - GOffice.Path- Increments references - GOffice.countto self.
 - 
ring_wedge(cx, cy, rx_out, ry_out, rx_in, ry_in, th0, th1)¶
- Parameters: 
 - 
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_COORDINATES- GOffice.PathOptions.SNAP_WIDTH- GOffice.PathOptions.SHARP
 - 
to_cairo(direction, cr)¶
- Parameters: - direction (GOffice.PathDirection) –GOffice.PathDirection
- cr (cairo.Context) –cairo.Context
 - Renders the path to the cairo context using its current settings. 
- direction (
 
- 
classmethod