Class: Treemap::LayoutBase
- Inherits:
-
Object
- Object
- Treemap::LayoutBase
- Defined in:
- lib/treemap/layout_base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#color ⇒ Object
Returns the value of attribute color.
-
#position ⇒ Object
Returns the value of attribute position.
Instance Method Summary collapse
-
#initialize {|_self| ... } ⇒ LayoutBase
constructor
A new instance of LayoutBase.
-
#process(node, bounds) ⇒ Object
Subclasses will override.
Constructor Details
#initialize {|_self| ... } ⇒ LayoutBase
Returns a new instance of LayoutBase.
17 18 19 20 21 22 23 24 |
# File 'lib/treemap/layout_base.rb', line 17 def initialize # Similar to the css style position. If set to :fixed x,y bounds calculations # should be computed relative to the root bounds. If set to :absolute then they # should be computed relative to the parent bounds. # See http://www.w3.org/TR/CSS2/visuren.html#positioning-scheme @position = :fixed yield self if block_given? end |
Instance Attribute Details
#color ⇒ Object
Returns the value of attribute color.
15 16 17 |
# File 'lib/treemap/layout_base.rb', line 15 def color @color end |
#position ⇒ Object
Returns the value of attribute position.
15 16 17 |
# File 'lib/treemap/layout_base.rb', line 15 def position @position end |
Instance Method Details
#process(node, bounds) ⇒ Object
Subclasses will override
27 28 |
# File 'lib/treemap/layout_base.rb', line 27 def process(node, bounds) end |