class Gsk::PathPoint

Overview

Represents a point on a path.

It can be queried for properties of the path at that point, such as its tangent or its curvature.

To obtain a Gsk::PathPoint, use Gsk::Path#closest_point, Gsk::Path#start_point, Gsk::Path#end_point or Gsk::PathMeasure#point.

Note that Gsk::PathPoint structs are meant to be stack-allocated, and don't hold a reference to the path object they are obtained from. It is the callers responsibility to keep a reference to the path as long as the Gsk::PathPoint is used.

Defined in:

lib/gi-crystal/src/auto/gsk-4.0/path_point.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.


Instance Method Detail

def compare(point2 : Gsk::PathPoint) : Int32 #

def copy : Gsk::PathPoint #

def distance(measure : Gsk::PathMeasure) : Float32 #

def equal(point2 : Gsk::PathPoint) : Bool #

def finalize #

def free : Nil #

def position(path : Gsk::Path) : Graphene::Point #

def rotation(path : Gsk::Path, direction : Gsk::PathDirection) : Float32 #

def tangent(path : Gsk::Path, direction : Gsk::PathDirection) : Graphene::Vec2 #

def to_unsafe : Pointer(Void) #