Class: RComposite::Canvas
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#image ⇒ Object
Returns the value of attribute image.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Attributes inherited from LayerSet
#bounding_height, #bounding_width, #layers, #max_x, #max_y, #min_x, #min_y, #name
Instance Method Summary collapse
-
#initialize(width, height, &block) ⇒ Canvas
constructor
A new instance of Canvas.
Methods inherited from LayerSet
#add_layer, #adjustment_layer, #bounding_box, #composite_layers, #fill_layer, #flatten, #layer, #layer_set, #offset, #remove_layer, #render, #rotate, #save_as, #scale, #stack
Constructor Details
#initialize(width, height, &block) ⇒ Canvas
Returns a new instance of Canvas.
6 7 8 9 10 11 12 13 14 |
# File 'lib/rcomposite/canvas.rb', line 6 def initialize(width, height, &block) @image = Magick::Image.new width, height @width = width @height = height $RCompositeCanvasWidth = @width $RCompositeCanvasHeight = @height super(:canvas, &block) end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
3 4 5 |
# File 'lib/rcomposite/canvas.rb', line 3 def height @height end |
#image ⇒ Object
Returns the value of attribute image.
4 5 6 |
# File 'lib/rcomposite/canvas.rb', line 4 def image @image end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
3 4 5 |
# File 'lib/rcomposite/canvas.rb', line 3 def width @width end |