Module: TaskJuggler::Painter::SVGSupport

Included in:
Element, Group
Defined in:
lib/taskjuggler/Painter/SVGSupport.rb

Overview

Utility module to convert the attributes into SVG compatible syntax.

Instance Method Summary collapse

Instance Method Details

#valuesToSVGObject



21
22
23
24
25
26
27
28
29
# File 'lib/taskjuggler/Painter/SVGSupport.rb', line 21

def valuesToSVG
  values = {}
  @values.each do |k, v|
    unit = k == :font_size ? 'pt' : ''
    # Convert the underscores to dashes and the symbols to Strings.
    values[k.to_s.gsub(/[_]/, '-')] = v.to_s + unit
  end
  values
end