Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | Related Pages

sge_draw.h

00001 /*
00002 *   SDL Graphics Extension
00003 *   Basic drawing functions (header)
00004 *
00005 *   Started 990815
00006 *
00007 *   License: LGPL v2+ (see the file LICENSE)
00008 *   (c)1999, 2000 Anders Lindström
00009 */
00010 
00011 /*********************************************************************
00012  *  This library is free software; you can redistribute it and/or    *
00013  *  modify it under the terms of the GNU Lesser General Public      *
00014  *  License as published by the Free Software Foundation; either     *
00015  *  version 2.1 of the License, or (at your option) any later version. *
00016  *********************************************************************/
00017 
00018 #ifndef sge_draw_H
00019 #define sge_draw_H
00020 
00021 #include <SDL/SDL.h>
00022 #include <wftk/sge_internal.h>
00023 
00024 
00025 /*
00026 *  Obsolete function names
00027 */
00028 #define sge_copy_sblock8 sge_write_block8
00029 #define sge_copy_sblock16 sge_write_block16
00030 #define sge_copy_sblock32 sge_write_block32
00031 #define sge_get_sblock8 sge_read_block8
00032 #define sge_get_sblock16 sge_read_block16
00033 #define sge_get_sblock32 sge_read_block32
00034 
00035 #ifdef _SGE_C
00036 extern "C" {
00037 #endif
00038 void sge_Update_OFF(void);
00039 void sge_Update_ON(void);
00040 void sge_Lock_OFF(void);
00041 void sge_Lock_ON(void);
00042 void sge_UpdateRect(SDL_Surface *screen, Sint16 x, Sint16 y, Uint16 w, Uint16 h);
00043 SDL_Surface *sge_CreateAlphaSurface(Uint32 flags, int width, int height);
00044 Uint32 sge_MapAlpha(Uint8 R, Uint8 G, Uint8 B, Uint8 A);
00045 void sge_SetError(const char *format, ...);
00046 
00047 void _PutPixel(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color);
00048 void _PutPixel8(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color);
00049 void _PutPixel16(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color);
00050 void _PutPixel24(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color);
00051 void _PutPixel32(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color);
00052 void _PutPixelX(SDL_Surface *dest,Sint16 x,Sint16 y,Uint32 color);
00053 
00054 Sint32 sge_CalcYPitch(SDL_Surface *dest,Sint16 y);
00055 void sge_pPutPixel(SDL_Surface *surface, Sint16 x, Sint32 ypitch, Uint32 color);
00056 
00057 void sge_PutPixel(SDL_Surface *surface, Sint16 x, Sint16 y, Uint32 color);
00058 Uint32 sge_GetPixel(SDL_Surface *surface, Sint16 x, Sint16 y);
00059 
00060 void sge_write_block8(SDL_Surface *Surface, Uint8 *block, Sint16 y);
00061 void sge_write_block16(SDL_Surface *Surface, Uint16 *block, Sint16 y);
00062 void sge_write_block32(SDL_Surface *Surface, Uint32 *block, Sint16 y);
00063 void sge_read_block8(SDL_Surface *Surface, Uint8 *block, Sint16 y);
00064 void sge_read_block16(SDL_Surface *Surface, Uint16 *block, Sint16 y);
00065 void sge_read_block32(SDL_Surface *Surface, Uint32 *block, Sint16 y);
00066 
00067 void sge_HLine(SDL_Surface *Surface, Sint16 x1, Sint16 x2, Sint16 y, Uint32 Color);
00068 void sge_VLine(SDL_Surface *Surface, Sint16 x, Sint16 y1, Sint16 y2, Uint32 Color);
00069 void sge_DoLine(SDL_Surface *Surface, Sint16 X1, Sint16 Y1, Sint16 X2, Sint16 Y2, Uint32 Color, int Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y, Uint32 Color));
00070 void sge_Line(SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 Color);
00071 void sge_Rect(SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color);
00072 void sge_FilledRect(SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color);
00073 void sge_DoEllipse(SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color, void Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y, Uint32 Color));
00074 void sge_Ellipse(SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color);
00075 void sge_FilledEllipse(SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color);
00076 void sge_DoCircle(SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 r, Uint32 color, void Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y, Uint32 Color));
00077 void sge_Circle(SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 r, Uint32 color);
00078 void sge_FilledCircle(SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 r, Uint32 color);
00079 
00080 void sge_ClearSurface(SDL_Surface *Surface, Uint32 color);
00081 int sge_BlitTransparent(SDL_Surface *Src, SDL_Surface *Dest, Sint16 SrcX, Sint16 SrcY, Sint16 DestX, Sint16 DestY, Sint16 W, Sint16 H, Uint32 Clear, Uint8 Alpha);
00082 int sge_Blit(SDL_Surface *Src, SDL_Surface *Dest, Sint16 SrcX, Sint16 SrcY, Sint16 DestX, Sint16 DestY, Sint16 W, Sint16 H);
00083 SDL_Surface *sge_copy_surface(SDL_Surface *src);
00084 
00085 SDL_Color sge_GetRGB(SDL_Surface *Surface, Uint32 Color);
00086 SDL_Color sge_FillPaletteEntry (Uint8 R, Uint8 G, Uint8 B);
00087 void sge_Fader(SDL_Surface *Surface, Uint8 sR,Uint8 sG,Uint8 sB, Uint8 dR,Uint8 dG,Uint8 dB,Uint32 *ctab,int start, int stop);
00088 void sge_AlphaFader(Uint8 sR,Uint8 sG,Uint8 sB,Uint8 sA, Uint8 dR,Uint8 dG,Uint8 dB,Uint8 dA, Uint32 *ctab,int start, int stop);
00089 void sge_SetupRainbowPalette(SDL_Surface *Surface,Uint32 *ctab,int intensity, int start, int stop);
00090 void sge_SetupBWPalette(SDL_Surface *Surface,Uint32 *ctab,int start, int stop);
00091 #ifdef _SGE_C
00092 }
00093 #endif
00094 
00095 #ifndef sge_C_ONLY
00096 void _PutPixel(SDL_Surface *screen, Sint16 x, Sint16 y, Uint8 R, Uint8 G, Uint8 B);
00097 void sge_PutPixel(SDL_Surface *screen, Sint16 x, Sint16 y, Uint8 R, Uint8 G, Uint8 B);
00098 void sge_HLine(SDL_Surface *Surface, Sint16 x1, Sint16 x2, Sint16 y, Uint8 R, Uint8 G, Uint8 B);
00099 void sge_VLine(SDL_Surface *Surface, Sint16 x, Sint16 y1, Sint16 y2, Uint8 R, Uint8 G, Uint8 B);
00100 void sge_DoLine(SDL_Surface *Surface, Sint16 X1, Sint16 Y1, Sint16 X2, Sint16 Y2, Uint8 R, Uint8 G, Uint8 B, int Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y, Uint32 Color));
00101 void sge_Line(SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 R, Uint8 G, Uint8 B);
00102 void sge_Rect(SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 R, Uint8 G, Uint8 B);
00103 void sge_FilledRect(SDL_Surface *Surface, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint8 R, Uint8 G, Uint8 B);
00104 void sge_DoEllipse(SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 R, Uint8 G, Uint8 B, void Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y, Uint32 Color));
00105 void sge_Ellipse(SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 R, Uint8 G, Uint8 B);
00106 void sge_FilledEllipse(SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint8 R, Uint8 G, Uint8 B);
00107 void sge_DoCircle(SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 r, Uint8 R, Uint8 G, Uint8 B, void Callback(SDL_Surface *Surf, Sint16 X, Sint16 Y, Uint32 Color));
00108 void sge_Circle(SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 r, Uint8 R, Uint8 G, Uint8 B);
00109 void sge_FilledCircle(SDL_Surface *Surface, Sint16 x, Sint16 y, Sint16 r, Uint8 R, Uint8 G, Uint8 B);
00110 void sge_ClearSurface(SDL_Surface *Surface, Uint8 R, Uint8 G, Uint8 B);
00111 #endif /* sge_C_ONLY */
00112 
00113 
00114 #endif /* sge_draw_H */

Generated Tue Aug 9 18:40:26 2005.
Copyright © 1998-2003 by the respective authors.

This document is licensed under the terms of the GNU Free Documentation License and may be freely distributed under the conditions given by this license.