class Celestine::Text
- Celestine::Text
- Celestine::Drawable
- Reference
- Object
Overview
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
Defined in:
drawables/text.crConstant Summary
-
TAG =
"text"
Instance Method Summary
-
#dominant_baseline : String | Nil
Changes where the natural anchor is for the text.
-
#dominant_baseline=(dominant_baseline : String | Nil)
Changes where the natural anchor is for the text.
-
#draw(io : IO) : Nil
Main draw method for a drawable.
-
#dx : IFNumber | Nil
Shifts the text position horizontally from a previous text element
-
#dx=(dx : IFNumber | Nil)
Shifts the text position horizontally from a previous text element
-
#dx_units : String | Nil
What kind of unit
#dx
should use when rendering -
#dx_units=(dx_units : String | Nil)
What kind of unit
#dx
should use when rendering -
#dy : IFNumber | Nil
Shifts the text position vertically from a previous text element
-
#dy=(dy : IFNumber | Nil)
Shifts the text position vertically from a previous text element
-
#dy_units : String | Nil
What kind of unit
#dy
should use when rendering -
#dy_units=(dy_units : String | Nil)
What kind of unit
#dy
should use when rendering -
#font_family : String | Nil
Changes the font family used.
-
#font_family=(font_family : String | Nil)
Changes the font family used.
-
#font_size : IFNumber | Nil
Changes the font size used.
-
#font_size=(font_size : IFNumber | Nil)
Changes the font size used.
-
#font_size_adjust : Float64 | Nil
Changes the font size adjustment.
-
#font_size_adjust=(font_size_adjust : Float64 | Nil)
Changes the font size adjustment.
-
#font_size_units : String | Nil
What kind of unit
#font_size
should use when rendering -
#font_size_units=(font_size_units : String | Nil)
What kind of unit
#font_size
should use when rendering -
#font_stretch : String | Nil
Changes the font stretch type.
-
#font_stretch=(font_stretch : String | Nil)
Changes the font stretch type.
-
#font_style : String | Nil
Changes the font style.
-
#font_style=(font_style : String | Nil)
Changes the font style.
-
#font_variant : String | Nil
Changes the font variant.
-
#font_variant=(font_variant : String | Nil)
Changes the font variant.
-
#font_weight : String | Nil
Changes the font weight.
-
#font_weight=(font_weight : String | Nil)
Changes the font weight.
-
#length : IFNumber | Nil
Changes the length of the text.
-
#length=(length : IFNumber | Nil)
Changes the length of the text.
-
#length_adjust : String | Nil
How the length should be adjusted.
-
#length_adjust=(length_adjust : String | Nil)
How the length should be adjusted.
-
#length_units : String | Nil
What kind of unit
#length
should use when rendering -
#length_units=(length_units : String | Nil)
What kind of unit
#length
should use when rendering -
#letter_spacing : IFNumber | Nil
Changes how far letters are spaced.
-
#letter_spacing=(letter_spacing : IFNumber | Nil)
Changes how far letters are spaced.
-
#letter_spacing_units : String | Nil
What kind of unit
#letter_spacing
should use when rendering -
#letter_spacing_units=(letter_spacing_units : String | Nil)
What kind of unit
#letter_spacing
should use when rendering -
#rotate : Array(Float64)
An array that allows for the rotation of each individual glyph
-
#rotate=(rotate : Array(Float64))
An array that allows for the rotation of each individual glyph
-
#text : String | Nil
The text to be displayed
-
#text=(text : String | Nil)
The text to be displayed
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::StrokeFill
color : String | Nil
color,
color=(color : String | Nil)
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=,
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=, 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::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 module Celestine::Modules::Transform
transform(&block : Celestine::Drawable::Transform -> Celestine::Drawable::Transform)
transform,
transform_attribute(io : IO)
transform_attribute
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 : Hash(String, String))
custom_attrs=,
draw(io : IO) : Nil
draw,
id : String | Nil
id,
id=(id : String | Nil)
id=,
id_attribute(io : IO)
id_attribute,
inner_elements : IO::Memory
inner_elements,
inner_elements=(inner_elements : IO::Memory)
inner_elements=,
style : Hash(String, String)
style,
style=(style : Hash(String, String))
style=,
style_attribute(io : IO)
style_attribute
Instance Method Detail
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
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
Main draw method for a drawable. Takes in and interacts with an io.
Shifts the text position horizontally from a previous text element
Shifts the text position horizontally from a previous text element
Shifts the text position vertically from a previous text element
Shifts the text position vertically from a previous text element
What kind of unit #font_size
should use when rendering
How the length should be adjusted.
- Potential values:
spacing | spacingAndGlyphs
- Mozilla SVG Docs
How the length should be adjusted.
- Potential values:
spacing | spacingAndGlyphs
- Mozilla SVG Docs
What kind of unit #length
should use when rendering
Changes how far letters are spaced.
TODO Make this SIFNumber?
since it can have the string value "normal" as well as numbers :(
Changes how far letters are spaced.
TODO Make this SIFNumber?
since it can have the string value "normal" as well as numbers :(
What kind of unit #letter_spacing
should use when rendering
What kind of unit #letter_spacing
should use when rendering
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
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