Re: [gtk-list] Re: Problem adding GdkRGB access to backing pixmap in scribble-simple



[...]
>> The buffer should have 3 bytes per pixel; so at least width*height*3
>> bytes. The "rowstride" is the distance between row starts, in bytes; so
>> for example, if you have row 0 at index 0, and row 1 is at index 37, then
>> your rowstride is 37-0=37. The rowstride can be larger than width*3, in
>> which case some bytes will be skipped (only width*3 bytes per row are
>> needed). If rowstride is larger than width, you need an accordingly larger
>> buffer.
>
>Just out of curiosity: Why would you want rowstride larger than width*3? What
>would the benefit be?

You can use this to create a subimage that shares memory with the enclosing 
image. Also, it may be desirable to aline rows on certain memory boundaries. 
It is, actually, genuinely useful.

-- 
+- David Given ---------------McQ-+ A friend is someone you call to help you
|  Work: dg@tao-group.com         | move. A real friend is someone you call to
|  Play: dgiven@iname.com         | help you move a body.                      
+- http://wired.st-and.ac.uk/~dg -+ 




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