Class: RSVGR::Line
- Inherits:
-
Object
- Object
- RSVGR::Line
- Defined in:
- lib/rsvgr.rb
Instance Method Summary collapse
-
#initialize(*args) ⇒ Line
constructor
A new instance of Line.
- #to_s ⇒ Object
Constructor Details
#initialize(*args) ⇒ Line
Returns a new instance of Line.
33 34 35 36 37 38 39 |
# File 'lib/rsvgr.rb', line 33 def initialize *args @x1 = 0 @y1 = 0 @x2 = 1 @y2 = 1 super end |
Instance Method Details
#to_s ⇒ Object
40 41 42 43 44 45 46 47 48 |
# File 'lib/rsvgr.rb', line 40 def to_s "<line" + " x1=\"#{DEFAULT_SIZE * @x1}\"" + " x2=\"#{DEFAULT_SIZE * @x2}\"" + " y1=\"#{DEFAULT_SIZE * @y1}\"" + " y2=\"#{DEFAULT_SIZE * @y2}\"" + "#{" stroke=\"#{@stroke_color}\"" if @stroke_color}" + "/>\n" end |