Zooming a DrawingArea

I’m writing a raster drawing application that uses a DrawingArea and
Cairo (for lack of easy to use raster drawing libraries for ruby).

Is there any way to zoom the DrawingArea? I tried a size request, but
that just extends it past the cairo context.

Also, it’s important that it is a raster zoom, not a vector zoom (a
pixel is 4 times bigger than normal if 4 times zoom).

If there is no easy way to do this, tips on how to implement it myself
would be great.


The best way to do this so far is this:

c = drawingarea.window.create_cairo_context
c.antialias = Cairo::ANTIALIAS_NONE
c.scale(@zoom, @zoom)
drawingarea.set_size_request(@width*@zoom, @height*@zoom)
c.set_source(@canvas, 0, 0)

It makes the pixels kinda round when you zoom in really far, though.