Re: [AD] Buried set_color_conversion

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


Eric Botcazou wrote:
Maybe problems with color conversion are related to the fact that
set_color_conversion is buried in the "Loading image files" chapter and
not in "Converting between color formats".

I actually consider it to be a feature: set_color_conversion() only
specifies the behaviour "when reading graphics from external bitmap files
or datafiles", so its entry in the docs is at the right place I think.  We
would have to move it only if we decided to broaden the scope of the
function, as suggested on allegro.cc by Kitty Cat.

It's also used in blit() to decide about dithering and about how to convert the transparent color ("grep _color_conv src/blit.c"). I think it's ok for the documentation to be where it is, but what about the attached clarification in the blit section (on top of Grzegorz' xref patch)?

Sven
Index: docs/src/allegro._tx
===================================================================
RCS file: /cvsroot/alleg/allegro/docs/src/allegro._tx,v
retrieving revision 1.205
diff -u -u -r1.205 allegro._tx
--- docs/src/allegro._tx	29 Dec 2003 18:05:22 -0000	1.205
+++ docs/src/allegro._tx	30 Dec 2003 19:02:55 -0000
@@ -4528,9 +4528,12 @@
    may be worth storing some of your more frequently used graphics in an 
    offscreen portion of the video memory.
 
-   Unlike most of the graphics routines, blit() allows the source and 
-   destination bitmaps to be of different color depths, so it can be used to 
-   convert images from one pixel format to another.
+   Unlike most of the graphics routines, blit() allows the source and
+   destination bitmaps to be of different color depths, so it can be
+   used to convert images from one pixel format to another. In this
+   case, the behavior is affected by the COLORCONV_KEEP_TRANS and
+   COLORCONV_DITHER* flags of the current color conversion mode: see
+   set_color_conversion() for more information.
 
 @\void @stretch_blit(BITMAP *source, BITMAP *dest,
 @\                  int source_x, source_y, source_width, source_height,


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