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
Instance Method Summary collapse
-
#initialize(scale = 1, color = 'ffffffff', colormode = :normal) ⇒ 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
Constructor Details
#initialize(scale = 1, color = 'ffffffff', colormode = :normal) ⇒ LabelStyle
Returns a new instance of LabelStyle.
963 964 965 966 |
# File 'lib/kamelopard/classes.rb', line 963 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.
961 962 963 |
# File 'lib/kamelopard/classes.rb', line 961 def scale @scale end |
Instance Method Details
#to_kml(elem = nil) ⇒ Object
968 969 970 971 972 973 974 975 976 |
# File 'lib/kamelopard/classes.rb', line 968 def to_kml(elem = nil) k = REXML::Element.new 'LabelStyle' super k s = REXML::Element.new 'scale' s.text = @scale k.elements << s elem.elements << k unless elem.nil? k end |