mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-17 23:50:16 +00:00
1b5dfcba7e
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.
25 lines
320 B
C
25 lines
320 B
C
#pragma once
|
|
|
|
#include "gskpathpoint.h"
|
|
#include "gskcontourprivate.h"
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
struct _GskRealPathPoint
|
|
{
|
|
GskPath *path;
|
|
gsize contour;
|
|
|
|
union {
|
|
struct {
|
|
unsigned int idx;
|
|
float t;
|
|
} std;
|
|
} data;
|
|
};
|
|
|
|
G_STATIC_ASSERT (sizeof (GskRealPathPoint) <= sizeof (GskPathPoint));
|
|
|
|
G_END_DECLS
|
|
|