| Class | Magick::RVG::TextBase |
| In: |
lib/rvg/text.rb
|
| Parent: | Object |
Add x and y to the current text position.
# File lib/rvg/text.rb, line 39
39: def d(x, y=0)
40: @dx, @dy = Magick::RVG.convert_to_float(x, y)
41: yield(self) if block_given?
42: self
43: end
Rotate the text about the current text position.
# File lib/rvg/text.rb, line 46
46: def rotate(degrees)
47: @rotation = Magick::RVG.convert_to_float(degrees)[0]
48: yield(self) if block_given?
49: self
50: end
Create a new text chunk. Each chunk can have its own initial position and styles. If x and y are omitted the text starts at the current text position.
# File lib/rvg/text.rb, line 31
31: def tspan(text, x=nil, y=nil)
32: tspan = Tspan.new(text, x, y)
33: tspan.parent = self
34: @tspans << tspan
35: return tspan
36: end