Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gskpath.h File Reference
#include <gsk/gsktypes.h>

Go to the source code of this file.

Macros

#define GSK_TYPE_PATH   (gsk_path_get_type ())
 

Typedefs

typedef gboolean(* GskPathForeachFunc) (GskPathOperation op, const graphene_point_t *pts, gsize n_pts, float weight, gpointer user_data)
 

Enumerations

enum  GskPathForeachFlags { GSK_PATH_FOREACH_ALLOW_ONLY_LINES = 0 , GSK_PATH_FOREACH_ALLOW_QUAD = (1 << 0) , GSK_PATH_FOREACH_ALLOW_CUBIC = (1 << 1) , GSK_PATH_FOREACH_ALLOW_CONIC = (1 << 2) }
 

Functions

GDK_AVAILABLE_IN_4_14 GType gsk_path_get_type (void) G_GNUC_CONST
 
GDK_AVAILABLE_IN_4_14 GskPathgsk_path_ref (GskPath *self)
 
GDK_AVAILABLE_IN_4_14 void gsk_path_unref (GskPath *self)
 
GDK_AVAILABLE_IN_4_14 void gsk_path_print (GskPath *self, GString *string)
 
GDK_AVAILABLE_IN_4_14 char * gsk_path_to_string (GskPath *self)
 
GDK_AVAILABLE_IN_4_14 GskPathgsk_path_parse (const char *string)
 
GDK_AVAILABLE_IN_4_14 void gsk_path_to_cairo (GskPath *self, cairo_t *cr)
 
GDK_AVAILABLE_IN_4_14 gboolean gsk_path_is_empty (GskPath *self)
 
GDK_AVAILABLE_IN_4_14 gboolean gsk_path_is_closed (GskPath *self)
 
GDK_AVAILABLE_IN_4_14 gboolean gsk_path_get_bounds (GskPath *self, graphene_rect_t *bounds)
 
GDK_AVAILABLE_IN_4_14 gboolean gsk_path_get_stroke_bounds (GskPath *self, const GskStroke *stroke, graphene_rect_t *bounds)
 
GDK_AVAILABLE_IN_4_14 gboolean gsk_path_in_fill (GskPath *self, const graphene_point_t *point, GskFillRule fill_rule)
 
GDK_AVAILABLE_IN_4_14 gboolean gsk_path_get_start_point (GskPath *self, GskPathPoint *result)
 
GDK_AVAILABLE_IN_4_14 gboolean gsk_path_get_end_point (GskPath *self, GskPathPoint *result)
 
GDK_AVAILABLE_IN_4_14 gboolean gsk_path_get_closest_point (GskPath *self, const graphene_point_t *point, float threshold, GskPathPoint *result, float *distance)
 
GDK_AVAILABLE_IN_4_14 gboolean gsk_path_foreach (GskPath *self, GskPathForeachFlags flags, GskPathForeachFunc func, gpointer user_data)
 

Macro Definition Documentation

◆ GSK_TYPE_PATH

#define GSK_TYPE_PATH   (gsk_path_get_type ())

Definition at line 84 of file gskpath.h.

Typedef Documentation

◆ GskPathForeachFunc

typedef gboolean(* GskPathForeachFunc) (GskPathOperation op, const graphene_point_t *pts, gsize n_pts, float weight, gpointer user_data)

GskPathForeachFunc: @op: The operation @pts: The points of the operation @n_pts: The number of points @weight: The weight for conic curves, or unused if not a conic curve @user_data: The user data provided with the function

Prototype of the callback to iterate through the operations of a path.

For each operation, the callback is given the @op itself, the points that the operation is applied to in @pts, and a @weight for conic curves. The @n_pts argument is somewhat redundant, since the number of points can be inferred from the operation.

Each contour of the path starts with a @GSK_PATH_MOVE operation. Closed contours end with a @GSK_PATH_CLOSE operation.

Returns: TRUE to continue iterating the path, FALSE to immediately abort and not call the function again.

Definition at line 78 of file gskpath.h.

Enumeration Type Documentation

◆ GskPathForeachFlags

GskPathForeachFlags: @GSK_PATH_FOREACH_ALLOW_ONLY_LINES: The default behavior, only allow lines. @GSK_PATH_FOREACH_ALLOW_QUAD: Allow emission of GSK_PATH_QUAD operations @GSK_PATH_FOREACH_ALLOW_CUBIC: Allow emission of GSK_PATH_CUBIC operations. @GSK_PATH_FOREACH_ALLOW_CONIC: Allow emission of GSK_PATH_CONIC operations.

Flags that can be passed to gsk_path_foreach() to influence what kinds of operations the path is decomposed into.

By default, [metho.nosp@m.d@Gs.nosp@m.k.Pat.nosp@m.h.fo.nosp@m.reach] will only emit a path with all operations flattened to straight lines to allow for maximum compatibility. The only operations emitted will be GSK_PATH_MOVE, GSK_PATH_LINE and GSK_PATH_CLOSE.

Since: 4.14

Enumerator
GSK_PATH_FOREACH_ALLOW_ONLY_LINES 
GSK_PATH_FOREACH_ALLOW_QUAD 
GSK_PATH_FOREACH_ALLOW_CUBIC 
GSK_PATH_FOREACH_ALLOW_CONIC 

Definition at line 48 of file gskpath.h.

49{
GskPathForeachFlags
Definition gskpath.h:49
@ GSK_PATH_FOREACH_ALLOW_QUAD
Definition gskpath.h:51
@ GSK_PATH_FOREACH_ALLOW_CUBIC
Definition gskpath.h:52
@ GSK_PATH_FOREACH_ALLOW_ONLY_LINES
Definition gskpath.h:50
@ GSK_PATH_FOREACH_ALLOW_CONIC
Definition gskpath.h:53

Function Documentation

◆ gsk_path_foreach()

GDK_AVAILABLE_IN_4_14 gboolean gsk_path_foreach ( GskPath * self,
GskPathForeachFlags flags,
GskPathForeachFunc func,
gpointer user_data )

◆ gsk_path_get_bounds()

GDK_AVAILABLE_IN_4_14 gboolean gsk_path_get_bounds ( GskPath * self,
graphene_rect_t * bounds )

◆ gsk_path_get_closest_point()

GDK_AVAILABLE_IN_4_14 gboolean gsk_path_get_closest_point ( GskPath * self,
const graphene_point_t * point,
float threshold,
GskPathPoint * result,
float * distance )

◆ gsk_path_get_end_point()

GDK_AVAILABLE_IN_4_14 gboolean gsk_path_get_end_point ( GskPath * self,
GskPathPoint * result )

◆ gsk_path_get_start_point()

GDK_AVAILABLE_IN_4_14 gboolean gsk_path_get_start_point ( GskPath * self,
GskPathPoint * result )

◆ gsk_path_get_stroke_bounds()

GDK_AVAILABLE_IN_4_14 gboolean gsk_path_get_stroke_bounds ( GskPath * self,
const GskStroke * stroke,
graphene_rect_t * bounds )

◆ gsk_path_get_type()

GDK_AVAILABLE_IN_4_14 GType gsk_path_get_type ( void )

◆ gsk_path_in_fill()

GDK_AVAILABLE_IN_4_14 gboolean gsk_path_in_fill ( GskPath * self,
const graphene_point_t * point,
GskFillRule fill_rule )

◆ gsk_path_is_closed()

GDK_AVAILABLE_IN_4_14 gboolean gsk_path_is_closed ( GskPath * self)

◆ gsk_path_is_empty()

GDK_AVAILABLE_IN_4_14 gboolean gsk_path_is_empty ( GskPath * self)

◆ gsk_path_parse()

GDK_AVAILABLE_IN_4_14 GskPath * gsk_path_parse ( const char * string)

◆ gsk_path_print()

GDK_AVAILABLE_IN_4_14 void gsk_path_print ( GskPath * self,
GString * string )

◆ gsk_path_ref()

GDK_AVAILABLE_IN_4_14 GskPath * gsk_path_ref ( GskPath * self)

◆ gsk_path_to_cairo()

GDK_AVAILABLE_IN_4_14 void gsk_path_to_cairo ( GskPath * self,
cairo_t * cr )

◆ gsk_path_to_string()

GDK_AVAILABLE_IN_4_14 char * gsk_path_to_string ( GskPath * self)

◆ gsk_path_unref()

GDK_AVAILABLE_IN_4_14 void gsk_path_unref ( GskPath * self)