OSDLFromGfx.h

Go to the documentation of this file.
00001 #ifndef OSDL_FROM_GFX_H_
00002 #define OSDL_FROM_GFX_H_
00003 
00004 
00005 /*
00006  * This file is meant to be only included internally by OSDLFromGfx.cc.
00007  *
00008  */
00009  
00010  
00011 // for OSDL::Video::Pixels::PixelColor, OSDL::Video::Pixels::ColorElement :
00012 #include "OSDLPixel.h"   
00013  
00014 
00015 // These functions operate directly on SDL surfaces :
00016 struct SDL_Surface ;
00017 
00018 
00019 /*
00020  * In this file, all per pixel operations are made thanks to the 
00021  * atomic putpixel functions of SDL_gfx.
00022  *
00023  * @see http://www.ferzkopp.net/~aschiffler/Software/SDL_gfx-2.0/
00024  *
00025  * Sadly enough, they are not exported by their header file
00026  * (SDL_gfxPrimitives.h), so to use them one has to duplicate their code.
00027  *
00028  * Many thanks nevertheless to A. Schiffler for his work !
00029  *
00030  * (LGPL license too)
00031  *
00032  */
00033 
00034 
00035 /* 
00036  * List of putpixel functions and of their dependencies ; 
00037  *
00038  * 1. No blending : 
00039  *
00040  *   fastPixelColorNolockNoclip (never used)
00041  *
00042  *   fastPixelColorNolock (no depends) [clips]
00043  *
00044  *   fastPixelColor = lock + fastPixelColorNolock 
00045  *   fastPixelRGBANolock = map + fastPixelColorNolock
00046  *
00047  *   fastPixelRGBA = map + fastPixelColor = map + lock + fastPixelColorNolock
00048  *
00049  *
00050  * 2. Blending :
00051  *
00052  *   _putPixelAlpha (no depends) [clips]
00053  *
00054  *   pixelColorNolock = map + _putPixelAlpha
00055  *   pixelColor = lock + map + _putPixelAlpha
00056  *
00057  *   pixelRGBA = ( map + fastPixelColor ) | pixelColor
00058  *
00059  *
00060  */
00061  
00062 /* Set up for C function definitions, even when using C++ */
00063 #ifdef __cplusplus
00064 extern "C" {
00065 #endif // __cplusplus
00066 
00067 
00068 
00069 // Supplementary pixel-level primitives to declare (were internal) :
00070  
00071 OSDL_DLL int fastPixelColorNolock( SDL_Surface * dst, Ceylan::Sint16 x,
00072     Ceylan::Sint16 y, Ceylan::Uint32 color ) ;
00073     
00074 OSDL_DLL int fastPixelColorNolockNoclip( SDL_Surface * dst, Ceylan::Sint16 x,
00075     Ceylan::Sint16 y, Ceylan::Uint32 color ) ;
00076     
00077 OSDL_DLL int fastPixelColor( SDL_Surface * dst, Ceylan::Sint16 x, 
00078     Ceylan::Sint16 y, Ceylan::Uint32 color ) ;
00079 
00080 
00081 // This one is not used :
00082 OSDL_DLL int fastPixelRGBA( SDL_Surface * dst, Ceylan::Sint16 x, 
00083     Ceylan::Sint16 y, Ceylan::Uint8 r, Ceylan::Uint8 g, Ceylan::Uint8 b,
00084      Ceylan::Uint8 a ) ;
00085  
00086 // This one is not used : 
00087 OSDL_DLL int fastPixelRGBANolock( SDL_Surface * dst, Ceylan::Sint16 x,
00088     Ceylan::Sint16 y, Ceylan::Uint8 r, Ceylan::Uint8 g, Ceylan::Uint8 b,
00089     Ceylan::Uint8 a ) ;
00090 
00091 
00105 OSDL_DLL int putPixelAlpha( SDL_Surface * surface, Ceylan::Sint16 x,
00106     Ceylan::Sint16 y, OSDL::Video::Pixels::PixelColor color,
00107     OSDL::Video::Pixels::ColorElement alpha ) ;
00108     
00109     
00110 /* 
00111  * This one is already exported by SDL_gfx :
00112  * int pixelColor( SDL_Surface * dst, Ceylan::Sint16 x, Ceylan::Sint16 y,
00113  * Ceylan::Uint32 color) ;
00114  *
00115  */
00116  
00117 OSDL_DLL int pixelColorNolock( SDL_Surface * dst, Ceylan::Sint16 x,
00118     Ceylan::Sint16 y, Ceylan::Uint32 color ) ;
00119 
00120 OSDL_DLL int aalineColorInt( SDL_Surface * dst, Ceylan::Sint16 x1,
00121     Ceylan::Sint16 y1, Ceylan::Sint16 x2, Ceylan::Sint16 y2, 
00122     Ceylan::Uint32 color, int draw_endpoint ) ;
00123 
00124 OSDL_DLL int hlineColorStore( SDL_Surface * dst, Ceylan::Sint16 x1,
00125     Ceylan::Sint16 x2, Ceylan::Sint16 y, Ceylan::Uint32 color ) ;
00126 
00127 OSDL_DLL int filledCircleRGBANotBlended( SDL_Surface * dst, 
00128     Ceylan::Sint16 x, Ceylan::Sint16 y, Ceylan::Sint16 rad, 
00129     Ceylan::Uint8 r, Ceylan::Uint8 g, Ceylan::Uint8 b, Ceylan::Uint8 a ) ;
00130 
00131 
00132 /* Ends C function definitions when using C++ */
00133 #ifdef __cplusplus
00134 }
00135 #endif // __cplusplus
00136 
00137 
00138 # endif // OSDL_FROM_GFX_H_
00139 

Generated on Fri Mar 30 14:46:59 2007 for OSDL by  doxygen 1.5.1