Class: LabelStyle

Inherits:
ColorStyle show all
Defined in:
lib/kamelopard/classes.rb

Overview

Corresponds to KML's LabelStyle object

Instance Attribute Summary (collapse)

Attributes inherited from ColorStyle

#color, #colormode

Attributes inherited from KMLObject

#comment, #id

Instance Method Summary (collapse)

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