Open main menu

Difference between revisions of "API-Truecolor"

689 bytes added ,  08:16, 14 July 2009
→‎New functions: added description of generic pixelformat constructors
m (added missing Graphics:: namespace prefix to crossBlit references)
(→‎New functions: added description of generic pixelformat constructors)
Line 184: Line 184:
*inline Graphics::PixelFormat Graphics::findCompatibleFormat(Common::List<Graphics::PixelFormat> backend, Common::List<Graphics::PixelFormat> frontend)
*inline Graphics::PixelFormat Graphics::findCompatibleFormat(Common::List<Graphics::PixelFormat> backend, Common::List<Graphics::PixelFormat> frontend)
**Returns the first entry on the backend list that also occurs in the frontend list, or CLUT8 if there is no matching format.
**Returns the first entry on the backend list that also occurs in the frontend list, or CLUT8 if there is no matching format.
*inline Graphics::PixelFormat (void)
**creates an uninitialized PixelFormat.
*inline Graphics::PixelFormat(byte BytesPerPixel, byte RBits, byte GBits, byte BBits, byte ABits, byte RShift, byte GShift, byte BShift, byte AShift)
**creates an initialized PixelFormat.
**[_]Bits is the width in bits of the relevant channel
***RBits = red bits, GBits = green bits, BBits = blue bits, ABits = alpha bits.
**[_]Shift is the number (starting from 0) of the least significant bit in the relevant channel, which is equal to the bitshift required to make a channel.
***In RGB565, RShift is 11, GShift is 5, and BShift is 0.
***In RGBA4444, RShift is 12, GShift is 8, BShift is 4, and AShift is 0.
*static inline Graphics::PixelFormat Graphics::PixelFormat::createFormatCLUT8(void)
*static inline Graphics::PixelFormat Graphics::PixelFormat::createFormatCLUT8(void)
**creates a PixelFormat set to indicate 256 color paletted mode
**creates a PixelFormat set to indicate 256 color paletted mode
20

edits