Class: TaskJuggler::Painter::Text

Inherits:
Element show all
Defined in:
lib/taskjuggler/Painter/Text.rb

Overview

A text element.

Constant Summary

Constants included from Primitives

Primitives::FillAndStrokeAttrs, Primitives::FillAttrs, Primitives::StrokeAttrs, Primitives::TextAttrs

Instance Method Summary collapse

Methods inherited from Element

#to_svg

Methods included from Primitives

#circle, #color, #ellipse, #group, #line, #points, #polyline, #rect, #text

Methods included from SVGSupport

#valuesToSVG

Constructor Details

#initialize(str, attrs) ⇒ Text

Create a text of str at x, y coordinates.



25
26
27
28
# File 'lib/taskjuggler/Painter/Text.rb', line 25

def initialize(str, attrs)
  super('text', [ :x, :y ] + TextAttrs, attrs)
  @text = str
end