ruby-libgd

GD::Image#filled_rectangle

Draws a filled rectangle on the image.

Signature

filled_rectangle(x1, y1, x2, y2, color)

Parameters

Example

img = GD::Image.new(400,300)
red = img.color(255,0,0)
img.filled_rectangle(50,50,200,150,red)
img.save("filled_rect.png")

Notes

Maps to gdImageFilledRectangle.