Class: KML::LineStyle

Inherits:
ColorStyle show all
Defined in:
lib/kml/line_style.rb

Overview

Specifies the drawing style (color, color mode, and line width) for all line geometry. Line geometry includes the outlines of outlined polygons and the extruded “tether” of Placemark icons (if extrusion is enabled).

Instance Attribute Summary collapse

Attributes inherited from ColorStyle

#color, #color_mode

Attributes inherited from Object

#id

Instance Method Summary collapse

Methods inherited from Object

#initialize, #parse

Constructor Details

This class inherits a constructor from KML::Object

Instance Attribute Details

#widthObject

Width of the line, in pixels.



6
7
8
# File 'lib/kml/line_style.rb', line 6

def width
  @width
end

Instance Method Details

#render(xm = Builder::XmlMarkup.new(:indent => 2)) ⇒ Object



8
9
10
11
12
13
# File 'lib/kml/line_style.rb', line 8

def render(xm=Builder::XmlMarkup.new(:indent => 2))
  xm.LineStyle {
    super
    xm.width(width) unless width.nil?
  }
end