Class: KML::PolyStyle

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

Overview

Specifies the drawing style for all polygons, including polygon extrusions (which look like the walls of buildings) and line extrusions (which look like solid fences).

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

#fillObject

Returns the value of attribute fill.



5
6
7
# File 'lib/kml/poly_style.rb', line 5

def fill
  @fill
end

#outlineObject

Returns the value of attribute outline.



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

def outline
  @outline
end

Instance Method Details

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



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

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