| Class | Magick::RVG::Utility::DefaultTextStrategy |
| In: |
lib/rvg/misc.rb
|
| Parent: | TextStrategy |
Handle "easy" text
# File lib/rvg/misc.rb, line 320
320: def render(x, y, text)
321: @ctx.gc.text(x, y, enquote(text))
322: tm = @ctx.shadow.get_type_metrics(text)
323: dx = case @ctx.text_attrs.text_anchor
324: when :start
325: tm.width
326: when :middle
327: tm.width / 2
328: when :end
329: 0
330: end
331: [dx, 0]
332: end