Open main menu

Difference between revisions of "API-Truecolor"

20 bytes added ,  21:54, 13 July 2009
m
added missing Graphics:: namespace prefix to crossBlit references
(removed references to convertScreenRect, which was removed as bloat)
m (added missing Graphics:: namespace prefix to crossBlit references)
Line 20: Line 20:
*Backends '''''must''''' place the highest color mode that is supported by the backend and the hardware at the beginning of the list returned by getSupportedFormats.
*Backends '''''must''''' place the highest color mode that is supported by the backend and the hardware at the beginning of the list returned by getSupportedFormats.
*Backends ''should'' support graphics in RGB(A) color order, even if their hardware uses a different color order, but are not required to.
*Backends ''should'' support graphics in RGB(A) color order, even if their hardware uses a different color order, but are not required to.
*Backends supporting color order conversion with limited hardware may use crossBlit, but are '''strongly recommended''' to use platform-optimized code.
*Backends supporting color order conversion with limited hardware may use Graphics::crossBlit, but are '''strongly recommended''' to use platform-optimized code.


== Truecolor API initialization protocol ==
== Truecolor API initialization protocol ==
Line 192: Line 192:


==== Miscellaneous ====
==== Miscellaneous ====
*bool crossBlit(byte *dst, const byte *src, int dstpitch, int srcpitch, int w, int h, Graphics::PixelFormat dstFmt, Graphics::PixelFormat srcFmt)
*bool Graphics::crossBlit(byte *dst, const byte *src, int dstpitch, int srcpitch, int w, int h, Graphics::PixelFormat dstFmt, Graphics::PixelFormat srcFmt)
**blits a rectangle from a "surface" in srcFmt to a "surface" in dstFmt
**blits a rectangle from a "surface" in srcFmt to a "surface" in dstFmt
**returns false if the blit fails (due to unsupported format conversion)
**returns false if the blit fails (due to unsupported format conversion)
20

edits