Commit Graph

4 Commits

Author SHA1 Message Date
Matthias Clasen
9439156123 Add gsk_path_dash
This is a function like gsk_path_foreach, but
it provides a dashed version of the path instead
of the original.
2023-08-05 12:36:10 -04:00
Matthias Clasen
d4331b14e0 Add gsk_path_get_stroke_bounds
This is a help to compute the bounds for
stroke nodes. We keep it private for now.
2023-08-05 12:36:10 -04:00
Matthias Clasen
fb9f3597fb Add GskPathMeasure
GskPathMeasure is an auxiliary object for
measuring path lengths.
2023-08-05 11:22:21 -04:00
Matthias Clasen
0475c14b0c gsk: Add basic path infrastructure
This commit adds the basic infrastructure for paths.
The public APIs consists of GskPath, GskPathPoint and
GskPathBuilder.

GskPath is a data structure for paths that consists
of contours, which in turn might contain Bézier curves.

The Bezier data structure is inspired by Skia, with separate
arrays for points and operations. One advantage of this
arrangement is that start and end points are shared
between adjacent curves.

In addition to the usual contours comprised of Bézier
segments, GskPath supports specialized contours directly,
such as rectangles, rounded rectangles and circles.
2023-08-05 09:42:38 -04:00