Class: LabelStyle
- Inherits:
-
ColorStyle
- Object
- KMLObject
- ColorStyle
- 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 KMLObject
Instance Method Summary collapse
-
#initialize(scale = 1, color = 'ffffffff', colormode = :normal) ⇒ LabelStyle
constructor
A new instance of LabelStyle.
- #to_kml(indent = 0) ⇒ Object
Methods inherited from ColorStyle
#alpha, #alpha=, #blue, #blue=, #green, #green=, #red, #red=, #validate_colormode
Constructor Details
#initialize(scale = 1, color = 'ffffffff', colormode = :normal) ⇒ LabelStyle
Returns a new instance of LabelStyle.
901 902 903 904 |
# File 'lib/kamelopard/classes.rb', line 901 def initialize(scale = 1, color = 'ffffffff', colormode = :normal) super(color, colormode) @scale = scale end |
Instance Attribute Details
#scale ⇒ Object
Returns the value of attribute scale.
899 900 901 |
# File 'lib/kamelopard/classes.rb', line 899 def scale @scale end |
Instance Method Details
#to_kml(indent = 0) ⇒ Object
906 907 908 909 910 911 912 913 914 |
# File 'lib/kamelopard/classes.rb', line 906 def to_kml(indent = 0) <<-labelstyle #{ ' ' * indent }<LabelStyle id="#{@id}"> #{ super(indent + 4) } #{ ' ' * indent } <scale>#{@scale}</scale> #{ ' ' * indent }</LabelStyle> labelstyle end |