2023-07-08 14:15:22 +00:00
|
|
|
/*
|
|
|
|
* Copyright © 2023 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* Authors: Matthias Clasen <mclasen@redhat.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#if !defined (__GSK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
|
|
|
#error "Only <gsk/gsk.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#include <gsk/gsktypes.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define GSK_TYPE_PATH_POINT (gsk_path_point_get_type ())
|
|
|
|
|
|
|
|
typedef struct _GskPathPoint GskPathPoint;
|
2023-09-07 11:45:59 +00:00
|
|
|
|
|
|
|
G_GNUC_EXTENSION struct _GskPathPoint
|
|
|
|
{
|
2023-07-08 14:15:22 +00:00
|
|
|
/*< private >*/
|
|
|
|
union {
|
2023-08-28 02:17:57 +00:00
|
|
|
struct {
|
|
|
|
gsize contour;
|
|
|
|
gsize idx;
|
|
|
|
float t;
|
|
|
|
};
|
|
|
|
gpointer padding[8];
|
|
|
|
graphene_vec4_t alignment;
|
|
|
|
};
|
2023-07-08 14:15:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
GDK_AVAILABLE_IN_4_14
|
|
|
|
GType gsk_path_point_get_type (void) G_GNUC_CONST;
|
|
|
|
|
|
|
|
GDK_AVAILABLE_IN_4_14
|
|
|
|
GskPathPoint * gsk_path_point_copy (GskPathPoint *point);
|
|
|
|
|
|
|
|
GDK_AVAILABLE_IN_4_14
|
|
|
|
void gsk_path_point_free (GskPathPoint *point);
|
|
|
|
|
2023-08-09 00:28:02 +00:00
|
|
|
GDK_AVAILABLE_IN_4_14
|
|
|
|
gboolean gsk_path_point_equal (const GskPathPoint *point1,
|
2023-12-27 02:55:59 +00:00
|
|
|
const GskPathPoint *point2) G_GNUC_PURE;
|
2023-08-09 00:28:02 +00:00
|
|
|
|
|
|
|
GDK_AVAILABLE_IN_4_14
|
|
|
|
int gsk_path_point_compare (const GskPathPoint *point1,
|
2023-12-27 02:55:59 +00:00
|
|
|
const GskPathPoint *point2) G_GNUC_PURE;
|
2023-08-09 00:28:02 +00:00
|
|
|
|
2023-07-08 14:15:22 +00:00
|
|
|
GDK_AVAILABLE_IN_4_14
|
2023-08-14 17:19:22 +00:00
|
|
|
void gsk_path_point_get_position (const GskPathPoint *point,
|
|
|
|
GskPath *path,
|
2023-07-08 14:15:22 +00:00
|
|
|
graphene_point_t *position);
|
|
|
|
|
|
|
|
GDK_AVAILABLE_IN_4_14
|
2023-08-14 17:19:22 +00:00
|
|
|
void gsk_path_point_get_tangent (const GskPathPoint *point,
|
|
|
|
GskPath *path,
|
2023-07-08 14:15:22 +00:00
|
|
|
GskPathDirection direction,
|
|
|
|
graphene_vec2_t *tangent);
|
|
|
|
|
2023-08-14 17:39:16 +00:00
|
|
|
GDK_AVAILABLE_IN_4_14
|
2023-08-18 16:09:19 +00:00
|
|
|
float gsk_path_point_get_rotation (const GskPathPoint *point,
|
|
|
|
GskPath *path,
|
|
|
|
GskPathDirection direction);
|
2023-08-14 17:39:16 +00:00
|
|
|
|
2023-07-08 14:15:22 +00:00
|
|
|
GDK_AVAILABLE_IN_4_14
|
2023-08-14 17:19:22 +00:00
|
|
|
float gsk_path_point_get_curvature (const GskPathPoint *point,
|
|
|
|
GskPath *path,
|
2023-08-24 18:00:08 +00:00
|
|
|
GskPathDirection direction,
|
2023-07-08 14:15:22 +00:00
|
|
|
graphene_point_t *center);
|
|
|
|
|
2023-08-13 15:08:22 +00:00
|
|
|
GDK_AVAILABLE_IN_4_14
|
|
|
|
float gsk_path_point_get_distance (const GskPathPoint *point,
|
|
|
|
GskPathMeasure *measure);
|
2023-08-09 00:28:02 +00:00
|
|
|
|
2023-07-08 14:15:22 +00:00
|
|
|
G_END_DECLS
|