Matthias Clasen
677e19042d
Docs: Cosmetics
2023-08-25 22:21:27 -04:00
Matthias Clasen
bd79f61cc5
pathpoint: Update the docs
...
We have gained some more ways of getting points.
2023-08-25 22:03:42 -04:00
Matthias Clasen
e1faf28310
Make curvature api more flexible
...
Add an extra direction argument to get_curvature to
allow picking the limit on either side, for sharp turns.
Update all callers.
2023-08-24 14:32:33 -04:00
Matthias Clasen
854c695153
pathpoint docs: Fix a link
...
Links gsk->gtk must be done manually, since we
don't have a dependency.
2023-08-24 13:41:39 -04:00
Matthias Clasen
ebd4ceca15
path docs: Clarify curvature
...
The curvature of lines is zero, not infinite.
2023-08-24 11:15:51 -04:00
Matthias Clasen
d873643407
path docs: Add another illustration
2023-08-24 11:09:28 -04:00
Matthias Clasen
a1d40c5236
Add gsk_path_point_get_rotation
...
This returns the tangent in the form of an angle.
2023-08-14 14:58:22 -04:00
Matthias Clasen
6ace4b60d8
pathpoint: Revise argument order
...
In order for introspection and documentation to
not be confused, we need to have the GskPathPoint
be the first argument.
Update all callers.
2023-08-14 13:20:34 -04:00
Matthias Clasen
2d923d362f
Merge branch 'bilelmoussaoui/gi-gsk' into 'main'
...
gsk/gi: new Path api fixes
See merge request GNOME/gtk!6265
2023-08-09 19:40:53 +00:00
Bilal Elmoussaoui
d4fcc883cb
gsk/gi: Add missing since annotations & docs
2023-08-09 20:26:46 +02:00
Matthias Clasen
68c6f63e90
pathpoint: Clarify docs
...
Add a paragraph explaining the situation
for comparing the start- and endpoint of
a closed path.
2023-08-09 11:30:26 -04:00
Matthias Clasen
5c55e9d11e
Add gsk_path_point_equal/compare
...
These just make sense to have.
2023-08-08 22:05:34 -04:00
Matthias Clasen
c35bb11c18
Simplify GskPathPoint
...
Use simple representation of just
{ contour index, segment index, t value }
2023-08-08 20:31:56 -04:00
Matthias Clasen
eb3ada6386
Fix path point preconditions
...
These were inverted and did not work. Oops.
2023-08-07 08:32:50 -04:00
Matthias Clasen
1b5dfcba7e
gsk: Add GskPath
...
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.
A GskPathPoint represents a point on a path, which can
be queried for various properties.
GskPathBuilder is an auxiliary builder object for paths.
2023-08-06 20:48:09 -04:00