Re: [AD] getpixel() documentation

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 3/28/06, Tore Halse <gnolam@xxxxxxxxxx> wrote:
> On 3/24/06, Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:
> > On Friday 24 March 2006 03:15, Tore Halse wrote:
> > > A thread came up on allegro.cc (
> > > http://www.allegro.cc/forums/thread/574279 ) that suggested a possible
> > > improvement on the documentation of getpixel().
> > >
> > > Attached is a diff that adds "see also" links to getr, getg, getb and
> > > geta, as well as an explicit mention on how to extract the individual
> > > color components of the value returned from getpixel().
> >
> > Thanks, looks good. I'm thinking of adding a link to the general `colour
> > formats' section as well.
> >
> > Evert
>
> Attached an updated diff with links to "Truecolor pixel formats" and
> "Palette routines" as well.

... well, _this time_ I attached it.
Mental note: "Send" is not the same thing as "Attach a file".

--
Feed me a stray cat.
--- allegro._tx.old	Tue Mar 28 02:14:31 2006
+++ allegro._tx	Tue Mar 28 02:13:31 2006
@@ -5993,7 +5993,8 @@
    mode.
 
 @@int @getpixel(BITMAP *bmp, int x, int y);
-@xref putpixel, _getpixel, is_inside_bitmap
+@xref putpixel, _getpixel, is_inside_bitmap, getr, getg, getb, geta
+@xref Truecolor pixel formats, Palette routines
 @eref ex12bit, exalpha, exflame, exlights
 @shortdesc Reads a pixel from a bitmap.
    Reads a pixel from point (x, y) in the bitmap.
@@ -6006,6 +6007,9 @@
    with alpha channel (when R,G,B,A are all equal to 255) so you can't use
    the test against -1 as a predicate for such bitmaps. In this cases, the
    only reliable predicate is is_inside_bitmap().
+
+   To extract the individual color components, use the getr() / getg() /
+   getb() / geta() family of functions.
 
 @@int @_getpixel(BITMAP *bmp, int x, int y);
 @@int @_getpixel15(BITMAP *bmp, int x, int y);


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/