Class: Hokusai::Commands::ScissorBegin

Inherits:
Base
  • Object
show all
Defined in:
ui/src/hokusai/commands/scissor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#after_draw, draw, #draw, on_draw

Constructor Details

#initialize(x, y, width, height) ⇒ ScissorBegin

Returns a new instance of ScissorBegin.



5
6
7
8
9
10
# File 'ui/src/hokusai/commands/scissor.rb', line 5

def initialize(x, y, width, height)
  @x = x
  @y = y
  @width = width
  @height = height
end

Instance Attribute Details

#heightObject (readonly)

Returns the value of attribute height.



3
4
5
# File 'ui/src/hokusai/commands/scissor.rb', line 3

def height
  @height
end

#widthObject (readonly)

Returns the value of attribute width.



3
4
5
# File 'ui/src/hokusai/commands/scissor.rb', line 3

def width
  @width
end

#xObject (readonly)

Returns the value of attribute x.



3
4
5
# File 'ui/src/hokusai/commands/scissor.rb', line 3

def x
  @x
end

#yObject (readonly)

Returns the value of attribute y.



3
4
5
# File 'ui/src/hokusai/commands/scissor.rb', line 3

def y
  @y
end

Instance Method Details

#hashObject



12
13
14
# File 'ui/src/hokusai/commands/scissor.rb', line 12

def hash
  [self.class, x, y, width, height].hash
end