Re: [AD] DRAW_MODE_OR

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


On Mon, 27 Mar 2000, Christian Schüler wrote:
> Hello, I think this is my first post in the conductors link. I have added
> an OR drawing mode because I needed one. I was really surprised that there
> is none in the Allegro lib. I gave it the number 6.

¿Any patch?

> I couldn't find anything about an OR drawing mode in the archieves either,
> is this issue really new? So now you know that there is at least one out
> there who actually needs it...

All sorts of funny drawing effects can be accomplished with a color map
table. Have you checked example excolmap? You can get OR drawing changing
return_grey_color to:

void return_grey_color(PALETTE pal, int x, int y, RGB *rgb)
{
   rgb->r = pal[y].r | pal[x].r;
   rgb->g = pal[y].g | pal[x].g;
   rgb->b = pal[y].b | pal[x].b;
}

After that, you won't see anything in the example for the first part,
because all the rectangles draw with color 0, black. Change the rectfills
to use say color makecol(128,128,128) and you will see that OR drawing
rectangle. It looks like a color brighter... is that what you need?

AFAIK you can get the same on truecolor modes with the blender function
set. This is not so efficient as a direct OR drawing, but well, anything
should be possible with such versatile tools.
-- 
  Grzegorz Adam Hankiewicz      -            gradha@xxxxxxxxxx
    http://glub.ehu.es/         -     http://welcome.to/gogosoftware/

 WinError 02F: Illegal operation has caused an general error while
 sharing resources with task 00BFD4 running under DOS window at 3B0 mode
 and memory latency mode at 1-3-3-3. Please tell us what this means.




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