AA canvas w/ point grid



Hi,

I'm currently working on a canvas (spin off from dia-newcanvas in gnome CVS actually) and am about to write the grid-item. However, I have great difficulty in drawing the grid properly. I think it's the easiest way (and probably the fastest) to modify the pixels in the GnomeCanvasBuf::buf directly. This however does not seem to work ;-(. I just do something like this:
	buf->buf[y * buf->rowstride + x] = 0xFF; /* red */
	buf->buf[y * buf->rowstride + x + 1] = 0xFF; /* green */
	buf->buf[y * buf->rowstride + x + 2] = 0xFF; /* blue */

I was expecting to see at least some white points on the canvas, but nothing seems to happen (except for a lot of my own debug messages).

Is there something terribly wrong with this approach?

Thanks in advance,

Arjan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]