Thursday, March 25, 2010


The distinction between a GdkPixBuf and the GdkPixMap/GdkBitmap is not to easy to appreciate -at the beginning at least. Its easy to assume that they are the something of the same thing but this isn't quite so. The GdkPixBuf is basically a means of loading imagery into memory where as the PixMap and BitMap objects allow direct drawing. Ok, the pixBuf can be drawn onto a pixel at a time and its contents filled but that's about it. The notion is to handle chunks of data at a more basic level rather than working with the niceties. Would it be more reasonable then, to move some of the image manipulations functionality found the gnocl::pixBuf module to a new module, gnocl::pixMap along with the drawing funcs etc? Both are 'off screen' yet the PixMap object can obtain the drawing surface of specific on-screen objects.
This approach would leave the pixbuf module for the sole process of working with the buffer in terms of composting and input/output.
Whilst it would be nice to find some clear distinctions between graphics packages, the practicality of it isn't that simple. There are many package layers, some of whose compenent functions have counterparts elsewhere. The challenge then, lies in deciding which area of functionality is best included in which gnocl package.

No comments: