module

Draw

Constants

CURVE_RECURSION_LIMIT = 32
VERSION = "0.1.0"

Instance methods

distance(x1 : Float64, y1 : Float64, x2 : Float64, y2 : Float64)
Source
flatten(path : Draw::Path, flattener : Draw::Flattener, scale : Float64)
Source
subdivide_cubic(c : Array(Float64), c1 : Array(Float64), c2 : Array(Float64))

Quad x1, y1, cpx1, cpy2, x2, y2 float64

Subdivide a Bezier quad curve in 2 equivalents Bezier quad curves. c1 and c2 parameters are the resulting curves length of c, c1 and c2 must be 6

Source
trace_arc(t : Draw::Liner, x : Float64, y : Float64, rx : Float64, ry : Float64, start : Float64, angle : Float64, scale : Float64)

TraceArc trace an arc using a Liner

Source
trace_cubic(t : Draw::Liner, cubic : Array(Float64), flattening_threshold : Float64)

TraceCubic generate lines subdividing the cubic curve using a Liner flattening_threshold helps determines the flattening expectation of the curve

Source
trace_quad(t : Draw::Liner, quad : Array(Float64), flattening_threshold : Float64)

TraceQuad generate lines subdividing the curve using a Liner flattening_threshold helps determines the flattening expectation of the curve

Source
vector_distance(dx : Float64, dy : Float64)
Source

Nested types