Re: Pixel color
- From: Francis BACQUE <fbacque free fr>
- To: gtkmm-list gnome org
- Subject: Re: Pixel color
- Date: Tue, 29 May 2007 13:12:33 +0200
Le Tue, 29 May 2007 11:01:29 +0200,
"Ole Laursen" <olau hardworking dk> a écrit :
> I have a set of helpers here:
>
> http://people.iola.dk/olau/misc/pixbuf-drawing.hpp
>
> You instantiate a PixelPosition with get_position(pixbuf, x, y). The
> pixel position can be moved around efficiently, and you can get to the
> pixel underneath with PixelPosition::pixel(), e.g.
>
> Pixel p = get_position(pixbuf, x, y).pixel();
> p.red() = 0xFF;
> p.green() = 0xAF;
> p.blue() = 0xAF;
> p.alpha() = 0x50;
>
> There's also PixelIterator for iterating through all pixels of a
> pixbuf.
>
Thanks, works great.
Francis
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]