class
Celestine::Symbol
- Celestine::Symbol
- Celestine::Drawable
- Reference
- Object
Overview
Class which defines a reusable graphical template
Included Modules
- Celestine::Meta::Context::Methods
- Celestine::Modules::Animate
- Celestine::Modules::Animate::Motion
- Celestine::Modules::Animate::Transform
- Celestine::Modules::Body
- Celestine::Modules::Clip
- Celestine::Modules::Filter
- Celestine::Modules::Mask
- Celestine::Modules::StrokeFill
- Celestine::Modules::Transform
Defined in:
celestine.crdrawables/symbol.cr
Constant Summary
-
TAG =
"symbol"
Instance Method Summary
-
#anchor(&block : Celestine::Anchor -> ) : Celestine::Anchor
Allows a
Celestine::Anchorto be made using a DSL call, and added to this drawables items. -
#circle(&block : Celestine::Circle -> ) : Celestine::Circle
Allows a
Celestine::Circleto be made using a DSL call, and added to this drawables items. -
#draw(io : IO) : Nil
Main draw method for a drawable.
-
#ellipse(&block : Celestine::Ellipse -> ) : Celestine::Ellipse
Allows a
Celestine::Ellipseto be made using a DSL call, and added to this drawables items. -
#group(&block : Celestine::Group -> ) : Celestine::Group
Allows a
Celestine::Groupto be made using a DSL call, and added to this drawables items. -
#image(&block : Celestine::Image -> ) : Celestine::Image
Allows a
Celestine::Imageto be made using a DSL call, and added to this drawables items. -
#line(&block : Celestine::Line -> ) : Celestine::Line
Allows a
Celestine::Lineto be made using a DSL call, and added to this drawables items. -
#path(&block : Celestine::Path -> ) : Celestine::Path
Allows a
Celestine::Pathto be made using a DSL call, and added to this drawables items. -
#polygon(&block : Celestine::Polygon -> ) : Celestine::Polygon
Allows a
Celestine::Polygonto be made using a DSL call, and added to this drawables items. -
#polyline(&block : Celestine::Polyline -> ) : Celestine::Polyline
Allows a
Celestine::Polylineto be made using a DSL call, and added to this drawables items. - #preserve_aspect_ratio : String | Nil
- #preserve_aspect_ratio=(preserve_aspect_ratio : String | Nil)
-
#rectangle(&block : Celestine::Rectangle -> ) : Celestine::Rectangle
Allows a
Celestine::Rectangleto be made using a DSL call, and added to this drawables items. -
#style(&block : Celestine::Style -> ) : Celestine::Style
Allows a
Celestine::Styleto be made using a DSL call, and added to this drawables items. -
#svg(&block : Celestine::Svg -> ) : Celestine::Svg
Allows a
Celestine::Svgto be made using a DSL call, and added to this drawables items. -
#text(&block : Celestine::Text -> ) : Celestine::Text
Allows a
Celestine::Textto be made using a DSL call, and added to this drawables items. - #view_box(x : IFNumber, y : IFNumber, w : IFNumber, h : IFNumber)
- #view_box : Celestine::ViewBox | Nil
- #view_box=(str : String)
- #view_box=(view_box : Celestine::ViewBox | Nil)
Instance methods inherited from module Celestine::Meta::Context::Methods
<<(drawable : Celestine::Drawable)
<<,
rough(roughness : Float64 = 1.0, bowing : Float64 = 1.0, seed : UInt64 = 42_u64, stroke : String = "#000", stroke_width : Number = 1.5, fill : String = "none", &block : Celestine::Rough::Builder -> ) : Celestine::Path
rough,
use(id : String)use(drawable : Celestine::Drawable)
use(drawable : Celestine::Drawable, &block : Celestine::Use -> )
use(id : String, &block : Celestine::Use -> )
use(&block : Celestine::Use -> ) use
Instance methods inherited from module Celestine::DataViz
donut_slice(cx : Number, cy : Number, r_inner : Number, r_outer : Number, start_angle : Number, end_angle : Number, fill : String = "#3b82f6", stroke : String | Nil = nil, stroke_width : Number = 1, &block : Celestine::Path -> ) : Celestine::Pathdonut_slice(cx : Number, cy : Number, r_inner : Number, r_outer : Number, start_angle : Number, end_angle : Number, fill : String = "#3b82f6", stroke : String | Nil = nil, stroke_width : Number = 1) : Celestine::Path donut_slice, progress_ring(cx : Number, cy : Number, radius : Number, progress : Number, track_color : String = "#e2e8f0", fill_color : String = "#3b82f6", stroke_width : Number = 8, start_angle : Float64 = -90.0, &block : Celestine::Group -> ) : Celestine::Group
progress_ring(cx : Number, cy : Number, radius : Number, progress : Number, track_color : String = "#e2e8f0", fill_color : String = "#3b82f6", stroke_width : Number = 8, start_angle : Float64 = -90.0) : Celestine::Group progress_ring, sparkline(data : Array(Number), x : Number, y : Number, width : Number, height : Number, stroke : String = "#0284c7", stroke_width : Number = 2, fill : String | Nil = nil, smooth : Bool = false, &block : Celestine::Path -> ) : Celestine::Path
sparkline(data : Array(Number), x : Number, y : Number, width : Number, height : Number, stroke : String = "#0284c7", stroke_width : Number = 2, fill : String | Nil = nil, smooth : Bool = false) : Celestine::Path sparkline
Instance methods inherited from module Celestine::Modules::Animate::Transform
animate_transform_rotate(&block : Celestine::Animate::Transform::Rotate -> )
animate_transform_rotate,
animate_transform_scale(&block : Celestine::Animate::Transform::Scale -> )
animate_transform_scale,
animate_transform_skew_x(&block : Celestine::Animate::Transform::SkewX -> )
animate_transform_skew_x,
animate_transform_skew_y(&block : Celestine::Animate::Transform::SkewY -> )
animate_transform_skew_y,
animate_transform_translate(&block : Celestine::Animate::Transform::Translate -> )
animate_transform_translate
Instance methods inherited from module Celestine::Modules::Animate::Motion
animate_motion(&block : Celestine::Animate::Motion -> )
animate_motion
Instance methods inherited from module Celestine::Modules::Animate
animate(&block : Celestine::Animate -> )
animate
Instance methods inherited from module Celestine::Modules::Clip
clip_path_attribute(io : IO)
clip_path_attribute,
clip_rule : String | Nil
clip_rule,
clip_rule=(val : String)
clip_rule=,
set_clip_path(id : String)set_clip_path(clip_path : Celestine::ClipPath) set_clip_path
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 -> )
transform,
transform_attribute(io : IO)
transform_attribute
Instance methods inherited from module Celestine::Modules::StrokeFill
color : String | Nil
color,
color=(color : String | Nil)color=(c : Celestine::Color) color=, color_interpolation : String | Nil color_interpolation, color_interpolation=(color_interpolation : String | Nil) color_interpolation=, color_interpolation_filters : String | Nil color_interpolation_filters, color_interpolation_filters=(color_interpolation_filters : String | Nil) color_interpolation_filters=, dash_array : Array(Float64) dash_array, dash_array=(dash_array : Array(Float64)) dash_array=, dash_offset : IFNumber | Nil dash_offset, dash_offset=(dash_offset : IFNumber | Nil) dash_offset=, dash_offset_units : String | Nil dash_offset_units, dash_offset_units=(dash_offset_units : String | Nil) dash_offset_units=, fill : String | Nil fill, fill=(fill : String | Nil)
fill=(color : Celestine::Color) fill=, fill_opacity : IFNumber | Nil fill_opacity, fill_opacity=(fill_opacity : IFNumber | Nil) fill_opacity=, fill_rule : Bool fill_rule, fill_rule=(fill_rule : Bool) fill_rule=, line_cap : String | Nil line_cap, line_cap=(line_cap : String | Nil) line_cap=, line_join : String | Nil line_join, line_join=(line_join : String | Nil) line_join=, miter_limit : IFNumber | Nil miter_limit, miter_limit=(miter_limit : IFNumber | Nil) miter_limit=, miter_limit_units : String | Nil miter_limit_units, miter_limit_units=(miter_limit_units : String | Nil) miter_limit_units=, opacity : IFNumber | Nil opacity, opacity=(opacity : IFNumber | Nil) opacity=, set_fill(pattern : Celestine::Pattern)
set_fill(gradient : Celestine::Gradient) set_fill, set_stroke(pattern : Celestine::Pattern)
set_stroke(gradient : Celestine::Gradient) set_stroke, shape_rendering : String | Nil shape_rendering, shape_rendering=(shape_rendering : String | Nil) shape_rendering=, stroke : String | Nil stroke, stroke=(stroke : String | Nil)
stroke=(color : Celestine::Color) stroke=, stroke_fill_attribute(io : IO) stroke_fill_attribute, stroke_opacity : IFNumber | Nil stroke_opacity, stroke_opacity=(stroke_opacity : IFNumber | Nil) stroke_opacity=, stroke_width : IFNumber | Nil stroke_width, stroke_width=(stroke_width : IFNumber | Nil) stroke_width=, stroke_width_units : String | Nil stroke_width_units, stroke_width_units=(stroke_width_units : String | Nil) stroke_width_units=, vector_effect : String | Nil vector_effect, vector_effect=(vector_effect : String | Nil) vector_effect=
Instance methods inherited from module Celestine::Modules::Body
body_attribute(io)
body_attribute,
height : IFNumber | Nil
height,
height=(height : IFNumber | Nil)
height=,
height_units : String | Nil
height_units,
height_units=(height_units : String | Nil)
height_units=,
width : IFNumber | Nil
width,
width=(width : IFNumber | Nil)
width=,
width_units : String | Nil
width_units,
width_units=(width_units : String | Nil)
width_units=
Instance methods inherited from module Celestine::Modules::Position
position_attribute(io : IO)
position_attribute,
x : IFNumber | Nil
x,
x=(x : IFNumber | Nil)
x=,
x_units : String | Nil
x_units,
x_units=(x_units : String | Nil)
x_units=,
y : IFNumber | Nil
y,
y=(y : IFNumber | Nil)
y=,
y_units : String | Nil
y_units,
y_units=(y_units : String | Nil)
y_units=
Instance methods inherited from class Celestine::Drawable
class_attribute(io : IO)
class_attribute,
classes : Array(String)
classes,
classes=(val : Array(String))
classes=,
custom_attribute(io : IO)
custom_attribute,
custom_attrs : Hash(String, String)
custom_attrs,
custom_attrs=(val : Hash(String, String))
custom_attrs=,
draw(io : IO) : Nil
draw,
has_inner_elements? : Bool
has_inner_elements?,
id : String | Nil
id,
id=(id : String | Nil)
id=,
id_attribute(io : IO)
id_attribute,
inner_elements : IO::Memory
inner_elements,
inner_elements=(val : IO::Memory)
inner_elements=,
style : Hash(String, String)
style,
style=(val : Hash(String, String))
style=,
style_attribute(io : IO)
style_attribute,
to_s(io : IO) : Nilto_s : String to_s
Instance Method Detail
Main draw method for a drawable. Takes in and interacts with an io.