[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-2D API - Outline



Hi Adrian,


AR> ppgSSprite:
AR>     A transparency encoded sprite.  Has special handling with
AR>     SBuffers, but is meaningful in other contexts.

I planned using transparency as option for all pixmaps/2d images.

Perhaps they should have some "encoding" field with values such as:

raw                     // framebuffer dump
transparency_colormask  // color x means transparent
transparency_rle        // kinda runlength encoding differentiating
                           between transparent and non-transparent parts
                           (I'm using something similar here)
transparency_alphamask  // grayscale alpha-mask added as separate channel
transparency_alphavalue // one transparency value for the entire image


etc


AR> Graphics Contexts
AR> -----------------
AR>
[..]
AR>     *  Commands for copying a ractangle from a ppgSSprite into ourselves.
AR>

This reminds me of something you said in another mail - something about
images being "connected" to a certain surface.

Perhaps I misunderstood you, but IMHO no Image should know about where it
will be drawn etc.

Of course a sprite (represented via an Image) has to know about about its
graphics context", but the image itself should not.


Cu
        Christian