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