Class: Kamelopard::LineStyle
- Inherits:
-
ColorStyle
- Object
- Object
- ColorStyle
- Kamelopard::LineStyle
- Defined in:
- lib/kamelopard/classes.rb
Overview
Corresponds to KML’s LineStyle object. Color is stored as an 8-character hex string, with two characters each of alpha, blue, green, and red values, in that order, matching the ordering the KML spec demands.
Instance Attribute Summary collapse
-
#labelVisibility ⇒ Object
Returns the value of attribute labelVisibility.
-
#outerColor ⇒ Object
Returns the value of attribute outerColor.
-
#outerWidth ⇒ Object
Returns the value of attribute outerWidth.
-
#physicalWidth ⇒ Object
Returns the value of attribute physicalWidth.
-
#width ⇒ Object
Returns the value of attribute width.
Attributes inherited from ColorStyle
Attributes inherited from Object
#comment, #kml_id, #master_only
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ LineStyle
constructor
A new instance of LineStyle.
- #to_kml(elem = nil) ⇒ Object
Methods inherited from ColorStyle
#alpha, #alpha=, #blue, #blue=, #green, #green=, #red, #red=, #validate_colorMode
Methods inherited from Object
#_alternate_to_kml, #change, #master_only?, parse
Constructor Details
#initialize(options = {}) ⇒ LineStyle
Returns a new instance of LineStyle.
1575 1576 1577 1578 1579 1580 1581 1582 1583 |
# File 'lib/kamelopard/classes.rb', line 1575 def initialize( = {}) @outerColor = 'ffffffff' @width = 1 @outerWidth = 0 @physicalWidth = 0 @labelVisibility = 0 super nil, end |
Instance Attribute Details
#labelVisibility ⇒ Object
Returns the value of attribute labelVisibility.
1573 1574 1575 |
# File 'lib/kamelopard/classes.rb', line 1573 def labelVisibility @labelVisibility end |
#outerColor ⇒ Object
Returns the value of attribute outerColor.
1573 1574 1575 |
# File 'lib/kamelopard/classes.rb', line 1573 def outerColor @outerColor end |
#outerWidth ⇒ Object
Returns the value of attribute outerWidth.
1573 1574 1575 |
# File 'lib/kamelopard/classes.rb', line 1573 def outerWidth @outerWidth end |
#physicalWidth ⇒ Object
Returns the value of attribute physicalWidth.
1573 1574 1575 |
# File 'lib/kamelopard/classes.rb', line 1573 def physicalWidth @physicalWidth end |
#width ⇒ Object
Returns the value of attribute width.
1573 1574 1575 |
# File 'lib/kamelopard/classes.rb', line 1573 def width @width end |
Instance Method Details
#to_kml(elem = nil) ⇒ Object
1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 |
# File 'lib/kamelopard/classes.rb', line 1585 def to_kml(elem = nil) k = XML::Node.new 'LineStyle' super k Kamelopard.kml_array(k, [ [ @width, 'width' ], [ @outerColor, 'gx:outerColor' ], [ @outerWidth, 'gx:outerWidth' ], [ @physicalWidth, 'gx:physicalWidth' ], ]) elem << k unless elem.nil? k end |