GOffice.BezierSpline¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
closed |
r/w |
whether the curve is closed. |
|
n |
r/w |
spline segments number. |
|
ref_count |
r |
||
x |
r/w |
control points abscissa. |
|
y |
r/w |
control points ordinates. |
Methods¶
class |
|
|
|
|
|
|
Details¶
- class GOffice.BezierSpline¶
- classmethod init(x, y, n, closed)¶
- Parameters:
- Returns:
a newly created struct
GOffice.BezierSpline
instance which should be destroyed by a call toGOffice.BezierSpline.destroy
.- Return type:
x and y values must be valid and finite. The returned structure contains the x and y coordinates of all control points, including the incoming data. the n and closed fields are just copies of the corresponding arguments.
- destroy()¶
Destroys the given structures after cleaning all allocated fields.
- to_cairo(cr, horiz_flip)¶
- Parameters:
cr (
cairo.Context
) – a cairo contexthoriz_flip (
bool
) – whether to flip horizontally (for a RTL canvas).
Renders the spline in \a cr
- to_path()¶
- Returns:
GOffice.Path
matching spline- Return type:
Builds a
GOffice.Path
using the control points evaluated inGOffice.BezierSpline.init
.