class Freetype::Outline

Overview

FT_Outline wrapper.

This structure is used to describe an outline to the scan-line converter.

Defined in:

freetype/outline.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(outline : LibFreetype::FT_Outline) #

[View source]

Instance Method Detail

def bbox #

[View source]
def cbox #

[View source]
def contours #

[View source]
def decompose(context = nil, move_to = nil, line_to = nil, conic_to = nil, cubic_to = nil, shift = 0, delta = 0) #

Decompose the outline into a sequence of move, line, conic, and cubic segments.

context: Arbitrary contextual object which will be passed as the last parameter of all callbacks. Typically an object to be drawn to, but can be anything.

move_to: Callback which will be passed an FT_Vector control point and the context. Called when outline needs to jump to a new path component.

line_to: Callback which will be passed an FT_Vector control point and the context. Called to draw a straight line from the current position to the control point.

conic_to: Callback which will be passed two FT_Vector control points and the context. Called to draw a second-order Bézier curve from the current position using the passed control points.

curve_to: Callback which will be passed three FT_Vector control points and the context. Called to draw a third-order Bézier curve from the current position using the passed control points.

shift: Passed to FreeType which will transform vectors via x = (x << shift) - delta and y = (y << shift) - delta

delta: Passed to FreeType which will transform vectors via x = (x << shift) - delta and y = (y << shift) - delta


[View source]
def flags #

[View source]
def inside_border #

[View source]
def n_contours #

[View source]
def n_points #

[View source]
def outline : LibFreetype::FT_Outline #

[View source]
def outside_border #

[View source]
def points #

[View source]
def tags #

[View source]