class Celestine::Svg
- Celestine::Svg
- Celestine::Drawable
- Reference
- Object
Overview
Group class which can group multiple drawables together.
Included Modules
- Celestine::Meta::Context::Methods
- Celestine::Modules::Animate
- Celestine::Modules::Animate::Motion
- Celestine::Modules::Animate::Transform
- Celestine::Modules::Body
- Celestine::Modules::Filter
- Celestine::Modules::Mask
- Celestine::Modules::StrokeFill
- Celestine::Modules::Transform
Defined in:
Constant Summary
-
TAG =
"svg"
Constructors
Instance Method Summary
-
#anchor(define = false, &block : Celestine::Anchor -> Celestine::Anchor) : Celestine::Anchor
Allows a
Celestine::Anchor
to be made using a DSL call. -
#circle(define = false, &block : Celestine::Circle -> Celestine::Circle) : Celestine::Circle
Allows a
Celestine::Circle
to be made using a DSL call. -
#define(drawable : Celestine::Drawable)
Add
drawable
to thisCelestine::Svg
's definitions, allowing it to beuse
d later. -
#draw(io : IO) : Nil
Draws this rectangle to an
IO
-
#ellipse(define = false, &block : Celestine::Ellipse -> Celestine::Ellipse) : Celestine::Ellipse
Allows a
Celestine::Ellipse
to be made using a DSL call. -
#filter(&block : Celestine::Filter -> Celestine::Filter)
Create a filter object and add it to this
Celestine::Svg
's defs -
#group(define = false, &block : Celestine::Group -> Celestine::Group) : Celestine::Group
Allows a
Celestine::Group
to be made using a DSL call. -
#image(define = false, &block : Celestine::Image -> Celestine::Image) : Celestine::Image
Allows a
Celestine::Image
to be made using a DSL call. -
#linear_gradient(&block : Celestine::Gradient::Linear -> Celestine::Gradient::Linear)
Create a linear gradient object and add it to this
Celestine::Svg
's defs -
#marker(&block : Celestine::Marker -> Celestine::Marker)
Create a marker object and add it to this
Celestine::Svg
's defs -
#mask(&block : Celestine::Mask -> Celestine::Mask)
Create a mask object and add it to this
Celestine::Svg
's defs -
#path(define = false, &block : Celestine::Path -> Celestine::Path) : Celestine::Path
Allows a
Celestine::Path
to be made using a DSL call. -
#pattern(&block : Celestine::Pattern -> Celestine::Pattern)
Create a pattern object and add it to this
Celestine::Svg
's defs -
#radial_gradient(&block : Celestine::Gradient::Radial -> Celestine::Gradient::Radial)
Create a linear gradient object and add it to this
Celestine::Svg
's defs -
#rectangle(define = false, &block : Celestine::Rectangle -> Celestine::Rectangle) : Celestine::Rectangle
Allows a
Celestine::Rectangle
to be made using a DSL call. -
#shape_rendering : String?
Provides hints to the renderer about what tradeoffs to make when rendering shapes like paths, circles, or rectangles.
-
#shape_rendering=(shape_rendering : String?)
Provides hints to the renderer about what tradeoffs to make when rendering shapes like paths, circles, or rectangles.
-
#svg(define = false, &block : Celestine::Svg -> Celestine::Svg) : Celestine::Svg
Allows a
Celestine::Svg
to be made using a DSL call. -
#text(define = false, &block : Celestine::Text -> Celestine::Text) : Celestine::Text
Allows a
Celestine::Text
to be made using a DSL call. - #view_box : Celestine::ViewBox?
- #view_box=(view_box : Celestine::ViewBox?)
Instance methods inherited from module Celestine::Meta::Context::Methods
<<(drawable : Celestine::Drawable)
<<,
use(id : String)use(drawable : Celestine::Drawable)
use(drawable : Celestine::Drawable, &block : Celestine::Use -> Celestine::Use)
use(id : String, &block : Celestine::Use -> Celestine::Use)
use(&block : Celestine::Use -> Celestine::Use) use
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::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 module Celestine::Modules::Body
body_attribute(io)
body_attribute,
height : IFNumber?
height,
height=(height : IFNumber?)
height=,
height_units : String?
height_units,
height_units=(height_units : String?)
height_units=,
width : IFNumber?
width,
width=(width : IFNumber?)
width=,
width_units : String?
width_units,
width_units=(width_units : String?)
width_units=
Instance methods inherited from module Celestine::Modules::Position
position_attribute(io : IO)
position_attribute,
x : IFNumber?
x,
x=(x : IFNumber?)
x=,
x_units : String?
x_units,
x_units=(x_units : String?)
x_units=,
y : IFNumber?
y,
y=(y : IFNumber?)
y=,
y_units : String?
y_units,
y_units=(y_units : String?)
y_units=
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
Constructor Detail
Instance Method Detail
Allows a Celestine::Anchor
to be made using a DSL call. Can be defined, which adds the drawable to the main context's definitions, and not to the main document itself.
Allows a Celestine::Circle
to be made using a DSL call. Can be defined, which adds the drawable to the main context's definitions, and not to the main document itself.
Add drawable
to this Celestine::Svg
's definitions, allowing it to be use
d later.
Allows a Celestine::Ellipse
to be made using a DSL call. Can be defined, which adds the drawable to the main context's definitions, and not to the main document itself.
Allows a Celestine::Group
to be made using a DSL call. Can be defined, which adds the drawable to the main context's definitions, and not to the main document itself.
Allows a Celestine::Image
to be made using a DSL call. Can be defined, which adds the drawable to the main context's definitions, and not to the main document itself.
Allows a Celestine::Path
to be made using a DSL call. Can be defined, which adds the drawable to the main context's definitions, and not to the main document itself.
Allows a Celestine::Rectangle
to be made using a DSL call. Can be defined, which adds the drawable to the main context's definitions, and not to the main document itself.
Provides hints to the renderer about what tradeoffs to make when rendering shapes like paths, circles, or rectangles.
- Potential Values:
auto | optimizeSpeed | crispEdges | geometricPrecision
- Mozilla SVG Docs
Provides hints to the renderer about what tradeoffs to make when rendering shapes like paths, circles, or rectangles.
- Potential Values:
auto | optimizeSpeed | crispEdges | geometricPrecision
- Mozilla SVG Docs
Allows a Celestine::Svg
to be made using a DSL call. Can be defined, which adds the drawable to the main context's definitions, and not to the main document itself.
Allows a Celestine::Text
to be made using a DSL call. Can be defined, which adds the drawable to the main context's definitions, and not to the main document itself.