Class: Svg::Feature

Inherits:
Object
  • Object
show all
Defined in:
lib/svg.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#fillObject

Returns the value of attribute fill.



3
4
5
# File 'lib/svg.rb', line 3

def fill
  @fill
end

#fill_opacityObject

Returns the value of attribute fill_opacity.



3
4
5
# File 'lib/svg.rb', line 3

def fill_opacity
  @fill_opacity
end

#strokeObject

Returns the value of attribute stroke.



3
4
5
# File 'lib/svg.rb', line 3

def stroke
  @stroke
end

#stroke_opacityObject

Returns the value of attribute stroke_opacity.



3
4
5
# File 'lib/svg.rb', line 3

def stroke_opacity
  @stroke_opacity
end

#stroke_widthObject

Returns the value of attribute stroke_width.



3
4
5
# File 'lib/svg.rb', line 3

def stroke_width
  @stroke_width
end

#styleObject

Returns the value of attribute style.



3
4
5
# File 'lib/svg.rb', line 3

def style
  @style
end

Instance Method Details

#attr_to_s(attr_name, attr_val) ⇒ Object



8
9
10
11
# File 'lib/svg.rb', line 8

def attr_to_s (attr_name, attr_val)
  return '' if attr_val.nil? 
  " #{attr_name}=\"#{attr_val}\"" if not attr_val.to_s.empty?
end

#point_to_s(x_attr_name, y_attr_name, point) ⇒ Object



13
14
15
16
17
# File 'lib/svg.rb', line 13

def point_to_s (x_attr_name, y_attr_name, point)
  return '' if point.nil? 
  return_val = " #{x_attr_name}=\"#{point.x}\"" if not point.x.to_s.empty?
  return_val + " #{y_attr_name}=\"#{point.y}\"" if not point.y.to_s.empty?
end

#to_svgObject



4
5
6
# File 'lib/svg.rb', line 4

def to_svg
  '<overrideme/>'
end