class Cairo::Path

Overview

Paths are the most basic drawing tools and are primarily used to implicitly generate simple masks.

Path is a data structure for holding a path. This data structure serves as the return value for Context#copy_path˙ andContext#copy_path_flatas well the input value forContext#append`.

See PathDataType for hints on how to iterate over the actual data within the path.

The num_data function gives the number of elements in the data array. This number is larger than the number of independent path portions (defined in PathDataType), since the data includes both headers and coordinates for each portion.

Defined in:

cairo/path.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(path : LibCairo::PPathT) #

[View source]

Instance Method Detail

def [](index : Int) : PathData #

[View source]
def finalize #

Immediately releases all memory associated with path. After a call to Path#finalize the path pointer is no longer valid and should not be used further.

NOTE should only be called Path returned by a Context function. Any path that is created manually (ie. outside of Context) should be destroyed manually as well.


[View source]
def num_data : Int32 #

Returns the number of elements in the path.


[View source]
def status : Status #

Returns the current error status.


[View source]
def status=(status : Status) #

[View source]
def to_cairo_path : LibCairo::PathT #

[View source]
def to_unsafe : LibCairo::PPathT #

[View source]