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)
-
- (Object) scale
Returns the value of attribute scale.
Attributes inherited from ColorStyle
Attributes inherited from KMLObject
Instance Method Summary (collapse)
-
- (LabelStyle) initialize(scale = 1, color = 'ffffffff', colormode = :normal)
constructor
A new instance of LabelStyle.
- - (Object) to_kml(indent = 0)
Methods inherited from ColorStyle
#alpha, #alpha=, #blue, #blue=, #green, #green=, #red, #red=, #validate_colormode
Constructor Details
- (LabelStyle) initialize(scale = 1, color = 'ffffffff', colormode = :normal)
A new instance of LabelStyle
829 830 831 832 |
# File 'lib/kamelopard/classes.rb', line 829 def initialize(scale = 1, color = 'ffffffff', colormode = :normal) super(color, colormode) @scale = scale end |
Instance Attribute Details
- (Object) scale
Returns the value of attribute scale
827 828 829 |
# File 'lib/kamelopard/classes.rb', line 827 def scale @scale end |
Instance Method Details
- (Object) to_kml(indent = 0)
834 835 836 837 838 839 840 841 842 |
# File 'lib/kamelopard/classes.rb', line 834 def to_kml(indent = 0) <<-labelstyle #{ ' ' * indent }<LabelStyle id="#{@id}"> #{ super(indent + 4) } #{ ' ' * indent } <scale>#{@scale}</scale> #{ ' ' * indent }</LabelStyle> labelstyle end |