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