class

Draw::Path

Inherits Draw::PathBuilder < Reference < Object

Constructors

new(components : Array(Draw::PathComponent), points : Array(Float64), x : Float64, y : Float64)
Source

Instance methods

append(cmd : Draw::PathComponent, *new_points : Float64)
Source
arc_to(cx : Float64, cy : Float64, rx : Float64, ry : Float64, start_angle : Float64, angle : Float64)

Adds an arc to the path

Source
clear

Clears the components from a path

Source
close

Closes the path

Source
components

Array of PathComponents in a Path and mark the role of each points in the Path

Source
cubic_curve_to(cx1 : Float64, cy1 : Float64, cx2 : Float64, cy2 : Float64, x : Float64, y : Float64)

Adds a cubic bezier curve to the current path

Source
dup

Duplicates a path

Source
empty?

Determines if the Path is empty or not

Source
last_point

Returns the current point of the current path

Source
line_to(x : Float64, y : Float64)

Adds a line to the current path

Source
move_to(x : Float64, y : Float64)

Starts a new path at (x, y) position

Source
points

points are combined with components to have a specific role in the path

Source
quad_curve_to(cx : Float64, cy : Float64, x : Float64, y : Float64)

Adds a quadratic bezier curve to the current path

Source
vertical_flip

Returns a new Path with a flipped y-axis

Source
x

X-coordinate of the last point in a path

Source
y

Y-coordinate of the last point in a path

Source