In Files

Methods

Class Index [+]

Quicksearch

Magick::RVG::Utility::DefaultTextStrategy

Handle “easy” text

Public Instance Methods

render(x, y, text) click to toggle source
     # 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

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.