Class: Magick::RVG::Tspan
- Includes:
- TextLink
- Defined in:
- lib/rvg/text.rb
Overview
class Tref
Instance Attribute Summary collapse
-
#parent ⇒ Object
Returns the value of attribute parent.
Instance Method Summary collapse
-
#initialize(text = nil, x = nil, y = nil, &block) ⇒ Tspan
constructor
Define a text segment starting at (
x
,y
).
Methods included from TextLink
#add_primitives, #cx, #cx=, #cy, #cy=
Methods inherited from TextBase
#add_primitives, #d, #rotate, #tspan
Methods included from Duplicatable
Methods included from Stylable
Constructor Details
#initialize(text = nil, x = nil, y = nil, &block) ⇒ Tspan
Define a text segment starting at (x
, y
). If x
and y
are omitted the segment starts at the current text position.
Tspan objects can contain Tspan objects.
121 122 123 124 |
# File 'lib/rvg/text.rb', line 121 def initialize(text=nil, x=nil, y=nil, &block) @x, @y = Magick::RVG.convert_to_float(x, y, :allow_nil) super(text, &block) end |
Instance Attribute Details
#parent ⇒ Object
Returns the value of attribute parent.
114 115 116 |
# File 'lib/rvg/text.rb', line 114 def parent @parent end |