Skip to content

class Celestine::Svg
inherits Celestine::Drawable #

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

Constants#

TAG = "svg" #

Class methods#

.new #

View source

Methods#

#anchor(define = false, &block : Celestine::Anchor -> Celestine::Anchor) : Celestine::Anchor #

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.

#circle(define = false, &block : Celestine::Circle -> Celestine::Circle) : Celestine::Circle #

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.

#define(drawable : Celestine::Drawable) #

Add drawable to this Celestine::Svg's definitions, allowing it to be used later.

View source

#draw(io : IO) : Nil #

Draws this rectangle to an IO

View source

#ellipse(define = false, &block : Celestine::Ellipse -> Celestine::Ellipse) : Celestine::Ellipse #

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.

#filter(&block : Celestine::Filter -> Celestine::Filter) #

Create a filter object and add it to this Celestine::Svg's defs

View source

#group(define = false, &block : Celestine::Group -> Celestine::Group) : Celestine::Group #

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.

#image(define = false, &block : Celestine::Image -> Celestine::Image) : Celestine::Image #

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.

#linear_gradient(&block : Celestine::Gradient::Linear -> Celestine::Gradient::Linear) #

Create a linear gradient object and add it to this Celestine::Svg's defs

View source

#marker(&block : Celestine::Marker -> Celestine::Marker) #

Create a marker object and add it to this Celestine::Svg's defs

View source

#mask(&block : Celestine::Mask -> Celestine::Mask) #

Create a mask object and add it to this Celestine::Svg's defs

View source

#path(define = false, &block : Celestine::Path -> Celestine::Path) : Celestine::Path #

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.

#pattern(&block : Celestine::Pattern -> Celestine::Pattern) #

Create a pattern object and add it to this Celestine::Svg's defs

View source

#radial_gradient(&block : Celestine::Gradient::Radial -> Celestine::Gradient::Radial) #

Create a linear gradient object and add it to this Celestine::Svg's defs

View source

#rectangle(define = false, &block : Celestine::Rectangle -> Celestine::Rectangle) : Celestine::Rectangle #

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.

#shape_rendering : String? #

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
View source

#shape_rendering=(shape_rendering : String?) #

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
View source

#svg(define = false, &block : Celestine::Svg -> Celestine::Svg) : Celestine::Svg #

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.

#text(define = false, &block : Celestine::Text -> Celestine::Text) : Celestine::Text #

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.

#view_box=(view_box : Celestine::ViewBox?) #

View source