Hullo,On Wed, 27 Jun 2007 22:18:15 +0100 neil at cloudsprinter.com wrote:
is there any way i can just plot one color of a surface into another, basically
i want to be able to get the part of the surface i want transparent into
another surface.
ie. if i have my bitmap with the transparent part as full red blue ( bright pink
) i can just plot all the pixels of that colour into another surface the same
size so i can keep a sperate shape of the transparancy bits.
does this make sence?
…
nope :o)
Ok, what it SOUNDS like to me (operating on 4h sleep, tho), is you’re asking
for one of two things:
EITHER
a)You want some sort of strange reverse-chromakeying thing, where you add
transparent pixels to the target image, and not any proper image pixels that
may be in the source image. I’m not quite sure why you might want such a
thing, maybe to make the target image disappear incrementally or something?
I’m also not sure how you’d implement this with the standard library things,
unless the non-transparent pixels are going to be all one colour (ie: just
two colours for whole source surface), in which case you could maybe use
a different chromakey for the source surface, uh, or something like that,
which I think MIGHT be possible, I’ve not tried anything like that before,
and not sure how to explain that.
Otherwise, you’d probably be able to implement this with a specialised
blitter, which shouldn’t really be too hard I expect.
OR,
b)You really want ordinary chromakeying/colourkeying, but are describing
it backwards, or at least in a way that sounds backwards to me ATM, in
which case just see the docs for the SDL_SetColorkey() function (base SDL
library).
If you’re not already familiar with that, have a read anyway and maybe try it
out with a little test code or such, it’s really easy to use (I forget ATM
whether you need to use a paletted source surface for it tho)
If the answer’s still “a” or “none of the above” though, you might want to
clarify a bit further anyhow.
Hope this helps a bit 
-Tom Barnes-Lawrence (taking a welcome short break from a difficult non-SDL
based problem)
I think I need a new signature