Class: Kamelopard::LabelStyle
- Inherits:
-
ColorStyle
- Object
- Object
- ColorStyle
- Kamelopard::LabelStyle
- Defined in:
- lib/kamelopard/classes.rb
Overview
Corresponds to KML’s LabelStyle object
Instance Attribute Summary collapse
-
#scale ⇒ Object
Returns the value of attribute scale.
Attributes inherited from ColorStyle
Attributes inherited from Object
#comment, #kml_id, #master_only
Instance Method Summary collapse
-
#initialize(scale = 1, options = {}) ⇒ LabelStyle
constructor
A new instance of LabelStyle.
- #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(scale = 1, options = {}) ⇒ LabelStyle
Returns a new instance of LabelStyle.
1553 1554 1555 1556 |
# File 'lib/kamelopard/classes.rb', line 1553 def initialize(scale = 1, = {}) @scale = scale super nil, end |
Instance Attribute Details
#scale ⇒ Object
Returns the value of attribute scale.
1551 1552 1553 |
# File 'lib/kamelopard/classes.rb', line 1551 def scale @scale end |
Instance Method Details
#to_kml(elem = nil) ⇒ Object
1558 1559 1560 1561 1562 1563 1564 1565 1566 |
# File 'lib/kamelopard/classes.rb', line 1558 def to_kml(elem = nil) k = XML::Node.new 'LabelStyle' super k s = XML::Node.new 'scale' s << @scale.to_s k << s elem << k unless elem.nil? k end |