Class: Disp3D::NodeRectangle
- Defined in:
- lib/node/node_rectangle.rb
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
- #box ⇒ Object
- #image=(texture_image) ⇒ Object
-
#initialize(geom, name = nil) ⇒ NodeRectangle
constructor
texture_image should be rmagick image.
Methods inherited from NodeLeaf
Methods inherited from Node
#ancestors, #post_draw, #pre_draw
Constructor Details
#initialize(geom, name = nil) ⇒ NodeRectangle
texture_image should be rmagick image
6 7 8 9 10 |
# File 'lib/node/node_rectangle.rb', line 6 def initialize(geom, name = nil) Util3D.check_arg_type(Symbol, name, true) Util3D.check_arg_type(GMath3D::Rectangle, geom, false, false) #Array is not allowed super end |
Instance Method Details
#box ⇒ Object
12 13 14 |
# File 'lib/node/node_rectangle.rb', line 12 def box return @geom.box end |
#image=(texture_image) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/node/node_rectangle.rb', line 16 def image=(texture_image) Util3D.check_arg_type(Magick::Image, texture_image, true) @image = texture_image initialize_texture update_for_display end |