Class: Painter::Rect
Instance Method Summary
collapse
Methods inherited from Operation
#_angle, #_color, #angle, #color, #initialize, pretty_accessor
Instance Method Details
#bottomRight(x, y) ⇒ Object
9
10
11
|
# File 'lib/painter/rect.rb', line 9
def bottomRight(x,y)
@_bottomRight = Point.new(x,y)
end
|
#draw ⇒ Object
13
14
15
16
17
|
# File 'lib/painter/rect.rb', line 13
def draw
::Painter::CGD2::gdImageFilledRectangle(@image.image_pointer,
@_topLeft.x, @_topLeft.y,
@_bottomRight.x, @_bottomRight.y, _color.rgba)
end
|
#topLeft(x, y) ⇒ Object
5
6
7
|
# File 'lib/painter/rect.rb', line 5
def topLeft(x,y)
@_topLeft = Point.new(x,y)
end
|