Expand the path docs a bit
This commit is contained in:
@@ -132,3 +132,19 @@ To obtain a `GskPathPoint`, use [method@Gsk.Path.get_closest_point], [method@Gsk
|
||||
To query properties of the path at a point, use [method@Gsk.PathPoint.get_position],
|
||||
[method@Gsk.PathPoint.get_tangent], [method@Gsk.PathPoint.get_rotation] and
|
||||
[method@Gsk.PathPoint.get_curvature].
|
||||
|
||||
## Going beyond GskPath
|
||||
|
||||
Lots of powerful functionality can be implemented for paths:
|
||||
|
||||
- Finding intersections
|
||||
- Offsetting curves
|
||||
- Molding curves (making them pass through a given point)
|
||||
|
||||
GSK does not provide API for all of these, but it does offer a way to get at
|
||||
the underlying Bézier curves, so you can implement such functionality yourself.
|
||||
You can use [method@Gsk.Path.foreach] to iterate over the operations of the
|
||||
path, and get the points needed to reconstruct or modify the path piece by piece.
|
||||
|
||||
See e.g. the [Primer on Bézier curves](https://pomax.github.io/bezierinfo/)
|
||||
for inspiration of useful things to explore.
|
||||
|
||||
Reference in New Issue
Block a user