Class: KML::Polygon
Overview
A Polygon is defined by an outer boundary and 0 or more inner boundaries. The boundaries, in turn, are defined by LinearRings. When a Polygon is extruded, its boundaries are connected to the ground to form additional polygons, which gives the appearance of a building. When a Polygon is extruded, each point is extruded individually. Extruded Polygons use PolyStyle for their color, color mode, and fill.
Instance Attribute Summary collapse
-
#inner_boundary_is ⇒ Object
Returns the value of attribute inner_boundary_is.
-
#outer_boundary_is ⇒ Object
Returns the value of attribute outer_boundary_is.
Attributes inherited from Object
Instance Method Summary collapse
Methods inherited from Geometry
#altitude_mode, #altitude_mode=, #altitude_mode_set?, #extrude, #extrude=, #extrude?, #tessellate, #tessellate=, #tessellate?
Methods inherited from Object
Constructor Details
This class inherits a constructor from KML::Object
Instance Attribute Details
#inner_boundary_is ⇒ Object
Returns the value of attribute inner_boundary_is.
27 28 29 |
# File 'lib/kml/polygon.rb', line 27 def inner_boundary_is @inner_boundary_is end |
#outer_boundary_is ⇒ Object
Returns the value of attribute outer_boundary_is.
28 29 30 |
# File 'lib/kml/polygon.rb', line 28 def outer_boundary_is @outer_boundary_is end |
Instance Method Details
#render(xm = Builder::XmlMarkup.new(:indent => 2)) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/kml/polygon.rb', line 30 def render(xm=Builder::XmlMarkup.new(:indent => 2)) xm.Polygon { super xm.outerBoundaryIs { outer_boundary_is.render(xm) } unless inner_boundary_is.nil? xm.innerBoundaryIs { inner_boundary_is.render(xm) } end } end |