Re: [AD] getpixel() documentation |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] getpixel() documentation
- From: "Tore Halse" <gnolam@xxxxxxxxxx>
- Date: Tue, 28 Mar 2006 02:01:26 +0200
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=OkrROCT7kK0NE73P5qp1ownP6xkjmd8nFWOeuXzxd8oRnG1E+MycXkzFuDE5IYahDAsRsV3nbHqGWrVYJ1EJ+Pus0tDeIez/Db2afOMJ5DlK+RzaLSzuu/1CwzNdbqtlp4RfD3a8jqdTLNFZ0+g6ol6Viw/fg7TRFtDTA7z3Ppw=
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);