class Gsk::Path

Overview

Describes lines and curves that are more complex than simple rectangles.

Paths can used for rendering (filling or stroking) and for animations (e.g. as trajectories).

Gsk::Path is an immutable, opaque, reference-counted struct. After creation, you cannot change the types it represents. Instead, new Gsk::Path objects have to be created. The Gsk::PathBuilder structure is meant to help in this endeavor.

Conceptually, a path consists of zero or more contours (continuous, connected curves), each of which may or may not be closed. Contours are typically constructed from Bézier segments.

A Path

Defined in:

lib/gi-crystal/src/auto/gsk-4.0/path.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pointer : Pointer(Void), transfer : GICrystal::Transfer) #

Class Method Detail

def self.g_type : UInt64 #

Returns the type id (GType) registered in GLib type system.


def self.parse(string : String) : Gsk::Path | Nil #

Instance Method Detail

def bounds : Graphene::Rect #

def closest_point(point : Graphene::Point, threshold : Float32) : Gsk::PathPoint #

def end_point : Gsk::PathPoint #

def finalize #

def foreach(flags : Gsk::PathForeachFlags, func : Gsk::PathForeachFunc, user_data : Pointer(Void) | Nil) : Bool #

def in_fill(point : Graphene::Point, fill_rule : Gsk::FillRule) : Bool #

def is_closed : Bool #

def is_empty : Bool #

def print(string : GLib::String) : Nil #

def ref : Gsk::Path #

def start_point : Gsk::PathPoint #

def stroke_bounds(stroke : Gsk::Stroke) : Graphene::Rect #

def to_cairo(cr : Cairo::Context) : Nil #

def to_string : String #

def to_unsafe : Pointer(Void) #

def unref : Nil #