Class: CTioga2::Graphics::Styles::LegendStorageStyle
- Inherits:
-
BasicStyle
- Object
- BasicStyle
- CTioga2::Graphics::Styles::LegendStorageStyle
- Defined in:
- lib/ctioga2/graphics/styles/legend.rb
Overview
Style of a given Legends::LegendStorage object.
Constant Summary
Constants inherited from BasicStyle
Instance Attribute Summary collapse
-
#dy ⇒ Object
The distance between two lines, a Types::Dimension object.
-
#picto_height ⇒ Object
The height of the legend pictogram, a Types::Dimension object.
-
#picto_to_text ⇒ Object
The distance between the legend pictogram and the text.
-
#picto_width ⇒ Object
The width of the legend pictogram, a Types::Dimension object.
-
#scale ⇒ Object
The scale of the legend.
-
#text_scale ⇒ Object
The scale of the legend text – relative to the overall scale.
Instance Method Summary collapse
-
#initialize ⇒ LegendStorageStyle
constructor
A new instance of LegendStorageStyle.
Methods inherited from BasicStyle
attr_accessor, attributes, from_hash, #instance_variable_defined?, #set_from_hash, #to_hash, #update_from_other
Constructor Details
#initialize ⇒ LegendStorageStyle
Returns a new instance of LegendStorageStyle.
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/ctioga2/graphics/styles/legend.rb', line 48 def initialize @dy = Types::Dimension.new(:dy, 1.6, :y) @picto_width = Types::Dimension.new(:dy, 1.6, :x) @picto_height = Types::Dimension.new(:dy, 0.6, :y) @picto_to_text = Types::Dimension.new(:dy, 0.3, :x) @scale = 0.8 @text_scale = 0.82 end |
Instance Attribute Details
#dy ⇒ Object
The distance between two lines, a Types::Dimension object.
30 31 32 |
# File 'lib/ctioga2/graphics/styles/legend.rb', line 30 def dy @dy end |
#picto_height ⇒ Object
The height of the legend pictogram, a Types::Dimension object.
36 37 38 |
# File 'lib/ctioga2/graphics/styles/legend.rb', line 36 def picto_height @picto_height end |
#picto_to_text ⇒ Object
The distance between the legend pictogram and the text
39 40 41 |
# File 'lib/ctioga2/graphics/styles/legend.rb', line 39 def picto_to_text @picto_to_text end |
#picto_width ⇒ Object
The width of the legend pictogram, a Types::Dimension object.
33 34 35 |
# File 'lib/ctioga2/graphics/styles/legend.rb', line 33 def picto_width @picto_width end |
#scale ⇒ Object
The scale of the legend
42 43 44 |
# File 'lib/ctioga2/graphics/styles/legend.rb', line 42 def scale @scale end |
#text_scale ⇒ Object
The scale of the legend text – relative to the overall scale.
46 47 48 |
# File 'lib/ctioga2/graphics/styles/legend.rb', line 46 def text_scale @text_scale end |