class Celestine::Path

Overview

A class which represents an SVG path. Methods starting with a_ use absolute coordinates, while r_ methods require relative coordinates.

Included Modules

Defined in:

Constant Summary

TAG = "path"

Instance Method Summary

Instance methods inherited from module Celestine::Modules::Animate::Transform

animate_transform_rotate(&block : Proc(Celestine::Animate::Transform::Rotate, Nil)) animate_transform_rotate, animate_transform_scale(&block : Proc(Celestine::Animate::Transform::Scale, Nil)) animate_transform_scale, animate_transform_skew_x(&block : Proc(Celestine::Animate::Transform::SkewX, Nil)) animate_transform_skew_x, animate_transform_skew_y(&block : Proc(Celestine::Animate::Transform::SkewY, Nil)) animate_transform_skew_y, animate_transform_translate(&block : Proc(Celestine::Animate::Transform::Translate, Nil)) animate_transform_translate

Instance methods inherited from module Celestine::Modules::Animate::Motion

animate_motion(&block : Celestine::Animate::Motion -> Celestine::Animate::Motion) animate_motion

Instance methods inherited from module Celestine::Modules::Animate

animate(&block : Proc(Celestine::Animate, Nil)) animate

Instance methods inherited from module Celestine::Modules::Marker

marker_attribute(io : IO) marker_attribute, set_marker_end(id : String)
set_marker_end(marker : Celestine::Marker)
set_marker_end
, set_marker_mid(id : String)
set_marker_mid(marker : Celestine::Marker)
set_marker_mid
, set_marker_start(id : String)
set_marker_start(marker : Celestine::Marker)
set_marker_start

Instance methods inherited from module Celestine::Modules::Filter

filter_attribute(io : IO) filter_attribute, set_filter(id : String)
set_filter(filter : Celestine::Filter)
set_filter

Instance methods inherited from module Celestine::Modules::Mask

mask_attribute(io : IO) mask_attribute, set_mask(id : String)
set_mask(mask : Celestine::Mask)
set_mask

Instance methods inherited from module Celestine::Modules::Transform

transform(&block : Celestine::Drawable::Transform -> Celestine::Drawable::Transform) transform, transform_attribute(io : IO) transform_attribute

Instance methods inherited from module Celestine::Modules::StrokeFill

color : String? color, color=(color : String?) color=, color_interpolation : String? color_interpolation, color_interpolation=(color_interpolation : String?) color_interpolation=, color_interpolation_filters : String? color_interpolation_filters, color_interpolation_filters=(color_interpolation_filters : String?) color_interpolation_filters=, dash_array : Array(Float64) dash_array, dash_array=(dash_array : Array(Float64)) dash_array=, dash_offset : IFNumber? dash_offset, dash_offset=(dash_offset : IFNumber?) dash_offset=, dash_offset_units : String? dash_offset_units, dash_offset_units=(dash_offset_units : String?) dash_offset_units=, fill : String? fill, fill=(fill : String?) fill=, fill_opacity : IFNumber? fill_opacity, fill_opacity=(fill_opacity : IFNumber?) fill_opacity=, fill_rule : Bool fill_rule, fill_rule=(fill_rule : Bool) fill_rule=, line_cap : String? line_cap, line_cap=(line_cap : String?) line_cap=, line_join : String? line_join, line_join=(line_join : String?) line_join=, miter_limit : IFNumber? miter_limit, miter_limit=(miter_limit : IFNumber?) miter_limit=, miter_limit_units : String? miter_limit_units, miter_limit_units=(miter_limit_units : String?) miter_limit_units=, opacity : IFNumber? opacity, opacity=(opacity : IFNumber?) opacity=, set_fill(gradient : Celestine::Gradient)
set_fill(pattern : Celestine::Pattern)
set_fill
, set_stroke(pattern : Celestine::Pattern)
set_stroke(gradient : Celestine::Gradient)
set_stroke
, shape_rendering : String? shape_rendering, shape_rendering=(shape_rendering : String?) shape_rendering=, stroke : String? stroke, stroke=(stroke : String?) stroke=, stroke_fill_attribute(io : IO) stroke_fill_attribute, stroke_opacity : IFNumber? stroke_opacity, stroke_opacity=(stroke_opacity : IFNumber?) stroke_opacity=, stroke_width : IFNumber? stroke_width, stroke_width=(stroke_width : IFNumber?) stroke_width=, stroke_width_units : String? stroke_width_units, stroke_width_units=(stroke_width_units : String?) stroke_width_units=, vector_effect : String? vector_effect, vector_effect=(vector_effect : String?) vector_effect=

Instance methods inherited from class Celestine::Drawable

class_attribute(io : IO) class_attribute, classes : Array(String) classes, classes=(classes : Array(String)) classes=, custom_attribute(io : IO) custom_attribute, custom_attrs : Hash(String, String) custom_attrs, custom_attrs=(custom_attrs) custom_attrs=, draw(io : IO) : Nil draw, id : String? id, id=(id : String?) id=, id_attribute(io : IO) id_attribute, inner_elements : IO::Memory inner_elements, inner_elements=(inner_elements) inner_elements=, style : Hash(String, String) style, style=(style) style=, style_attribute(io : IO) style_attribute

Instance Method Detail

def a_arc(x, y, rx, ry, rotation = 0, large = false, flip = false) #

def a_bcurve(cx1, cy1, cx2, cy2, x, y) #

def a_h_line(x) #

Draws a horizontal line to an absolute point


def a_line(x, y) #

Draws a line to an absolute point


def a_move(x, y) #

Moves to an absolute point


def a_q_bcurve(cx, cy, x, y) #

def a_s_bcurve(cx2, cy2, x, y) #

def a_t_bcurve(x, y) #

def a_v_line(y) #

Draws a vertical line to an absolute point


def close #

Closes the path.


def code #

Finalized path code points.


def code=(other : String) #

def draw(io : IO) : Nil #
Description copied from class Celestine::Drawable

Main draw method for a drawable. Takes in and interacts with an io.


def r_arc(x, y, rx, ry, rotation = 0, large = false, flip = false) #

def r_bcurve(cx1, cy1, cx2, cy2, x, y) #

def r_h_line(x) #

Draws a horizontal line to a relative point


def r_line(x, y) #

Draws a line to a relative point


def r_move(x, y) #

Moves to a relative point


def r_q_bcurve(cx, cy, x, y) #

def r_s_bcurve(cx2, cy2, x, y) #

def r_t_bcurve(x, y) #

def r_v_line(y) #

Draws a vertical line to a relative point