class Celestine::Text
inherits Celestine::Drawable
#
Draws and holds information for text
Included modules
Celestine::Modules::Animate
Celestine::Modules::Animate::Motion
Celestine::Modules::Animate::Transform
Celestine::Modules::Filter
Celestine::Modules::Mask
Celestine::Modules::Position
Celestine::Modules::StrokeFill
Celestine::Modules::Transform
Constants#
TAG = "text"
#
"text"
Methods#
#dominant_baseline : String?
#
: String?
Changes where the natural anchor is for the text.
- Potential Values:
auto | text-bottom | alphabetic | ideographic | middle | central | mathematical | hanging | text-top
- Mozilla SVG Docs
#dominant_baseline=(dominant_baseline : String?)
#
(dominant_baseline : String?)
Changes where the natural anchor is for the text.
- Potential Values:
auto | text-bottom | alphabetic | ideographic | middle | central | mathematical | hanging | text-top
- Mozilla SVG Docs
#draw(io : IO) : Nil
#
(io : IO) : Nil
Main draw method for a drawable. Takes in and interacts with an io.
#dx : IFNumber?
#
: IFNumber?
Shifts the text position horizontally from a previous text element
#dx=(dx : IFNumber?)
#
(dx : IFNumber?)
Shifts the text position horizontally from a previous text element
#dy : IFNumber?
#
: IFNumber?
Shifts the text position vertically from a previous text element
#dy=(dy : IFNumber?)
#
(dy : IFNumber?)
Shifts the text position vertically from a previous text element
#font_size : IFNumber?
#
: IFNumber?
Changes the font size used.
#font_size=(font_size : IFNumber?)
#
(font_size : IFNumber?)
Changes the font size used.
#font_size_units=(font_size_units : String?)
#
(font_size_units : String?)
What kind of unit font_size
should use when rendering
#length : IFNumber?
#
: IFNumber?
Changes the length of the text.
#length=(length : IFNumber?)
#
(length : IFNumber?)
Changes the length of the text.
#length_adjust : String?
#
: String?
How the length should be adjusted.
- Potential values:
spacing | spacingAndGlyphs
- Mozilla SVG Docs
#length_adjust=(length_adjust : String?)
#
(length_adjust : String?)
How the length should be adjusted.
- Potential values:
spacing | spacingAndGlyphs
- Mozilla SVG Docs
#letter_spacing : IFNumber?
#
: IFNumber?
Changes how far letters are spaced.
- Mozilla SVG Docs
TODO: Make this
SIFNumber?
since it can have the string value "normal" as well as numbers :(
#letter_spacing=(letter_spacing : IFNumber?)
#
(letter_spacing : IFNumber?)
Changes how far letters are spaced.
- Mozilla SVG Docs
TODO: Make this
SIFNumber?
since it can have the string value "normal" as well as numbers :(
#letter_spacing_units : String?
#
: String?
What kind of unit letter_spacing
should use when rendering
#letter_spacing_units=(letter_spacing_units : String?)
#
(letter_spacing_units : String?)
What kind of unit letter_spacing
should use when rendering
#rotate : Array(Float64)
#
: Array(Float64)
An array that allows for the rotation of each individual glyph
- Mozilla SVG Docs note the docs here do not talk about this usage, only on the main element page mentions this
#rotate=(rotate : Array(Float64))
#
(rotate : Array(Float64))
An array that allows for the rotation of each individual glyph
- Mozilla SVG Docs note the docs here do not talk about this usage, only on the main element page mentions this
module Celestine::Text::Attrs
#
Included modules
Celestine::Modules::Filter::Attrs
Celestine::Modules::Mask::Attrs
Celestine::Modules::Position::Attrs
Celestine::Modules::StrokeFill::Attrs
Celestine::Modules::Transform::Attrs
Constants#
DOMINANT_BASELINE = "dominant-baseline"
#
"dominant-baseline"
DX = "dx"
#
"dx"
DY = "dy"
#
"dy"
FONT_FAMILY = "font-family"
#
"font-family"
FONT_SIZE = "font-size"
#
"font-size"
FONT_SIZE_ADJUST = "font-size-adjust"
#
"font-size-adjust"
FONT_STRETCH = "font-stretch"
#
"font-stretch"
FONT_STYLE = "font-style"
#
"font-style"
FONT_VARIANT = "font-variant"
#
"font-variant"
FONT_WEIGHT = "font-weight"
#
"font-weight"
LENGTH = "textLength"
#
"textLength"
LENGTH_ADJUST = "lengthAdjust"
#
"lengthAdjust"
LETTER_SPACING = "letter-spacing"
#
"letter-spacing"
ROTATE = "rotate"
#
"rotate"