~ubuntu-branches/ubuntu/wily/enigma/wily-proposed

« back to all changes in this revision

Viewing changes to src/px/SDL_gfxPrimitives.h

  • Committer: Bazaar Package Importer
  • Author(s): Erich Schubert
  • Date: 2005-08-28 15:30:09 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050828153009-sky64kb6tcq37xt5
Tags: 0.92.1-1
* New upstream subversion checkout
* Remove menu.s3m, which we are allowed to distributed but not to modify
  also copyright notice is confusing... (Closes: #321669)
* Rebuild with new libzipios (Closes: #325405)
  I hope this works without a versioned build-dependency
* Added "enigma replaces enigma-data" for upgrades (Closes: #308558)
* Added notes about the fonts copyright.
* updated to policy 3.6.2.1 (no changes)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
/* 
3
 
 
4
 
 SDL_gfxPrimitives: graphics primitives for SDL
5
 
 
6
 
 LGPL (c) A. Schiffler
7
 
 
8
 
*/
9
 
 
10
 
#ifndef _SDL_gfxPrimitives_h
11
 
#define _SDL_gfxPrimitives_h
12
 
 
13
 
#include <math.h>
14
 
#ifndef M_PI
15
 
#define M_PI    3.141592654
16
 
#endif
17
 
 
18
 
#include "SDL.h"
19
 
 
20
 
/* Set up for C function definitions, even when using C++ */
21
 
#ifdef __cplusplus
22
 
extern "C" {
23
 
#endif
24
 
 
25
 
/* ----- Versioning */
26
 
 
27
 
#define SDL_GFXPRIMITIVES_MAJOR 1
28
 
#define SDL_GFXPRIMITIVES_MINOR 5
29
 
 
30
 
/* ----- Prototypes */
31
 
 
32
 
/* Note: all ___Color routines expect the color to be in format 0xRRGGBBAA */
33
 
 
34
 
/* Pixel */
35
 
 
36
 
    int pixelColor(SDL_Surface * dst, Sint16 x, Sint16 y, Uint32 color);
37
 
    int pixelRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
38
 
 
39
 
/* Horizontal line */
40
 
 
41
 
    int hlineColor(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint32 color);
42
 
    int hlineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 x2, Sint16 y, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
43
 
 
44
 
/* Vertical line */
45
 
 
46
 
    int vlineColor(SDL_Surface * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint32 color);
47
 
    int vlineRGBA(SDL_Surface * dst, Sint16 x, Sint16 y1, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
48
 
 
49
 
/* Rectangle */
50
 
 
51
 
    int rectangleColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color);
52
 
    int rectangleRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1,
53
 
                                   Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
54
 
 
55
 
/* Filled rectangle (Box) */
56
 
 
57
 
    int boxColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color);
58
 
    int boxRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2,
59
 
                             Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
60
 
 
61
 
/* Line */
62
 
 
63
 
    int lineColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color);
64
 
    int lineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1,
65
 
                              Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
66
 
 
67
 
/* AA Line */
68
 
    int aalineColor(SDL_Surface * dst, Sint16 x1, Sint16 y1, Sint16 x2, Sint16 y2, Uint32 color);
69
 
    int aalineRGBA(SDL_Surface * dst, Sint16 x1, Sint16 y1,
70
 
                                Sint16 x2, Sint16 y2, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
71
 
 
72
 
/* Circle */
73
 
 
74
 
    int circleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 r, Uint32 color);
75
 
    int circleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
76
 
 
77
 
/* AA Circle */
78
 
 
79
 
    int aacircleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 r, Uint32 color);
80
 
    int aacircleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y,
81
 
                                  Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
82
 
 
83
 
/* Filled Circle */
84
 
 
85
 
    int filledCircleColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 r, Uint32 color);
86
 
    int filledCircleRGBA(SDL_Surface * dst, Sint16 x, Sint16 y,
87
 
                                      Sint16 rad, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
88
 
 
89
 
/* Ellipse */
90
 
 
91
 
    int ellipseColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color);
92
 
    int ellipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y,
93
 
                                 Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
94
 
 
95
 
/* AA Ellipse */
96
 
 
97
 
    int aaellipseColor(SDL_Surface * dst, Sint16 xc, Sint16 yc, Sint16 rx, Sint16 ry, Uint32 color);
98
 
    int aaellipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y,
99
 
                                   Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
100
 
 
101
 
/* Filled Ellipse */
102
 
 
103
 
    int filledEllipseColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rx, Sint16 ry, Uint32 color);
104
 
    int filledEllipseRGBA(SDL_Surface * dst, Sint16 x, Sint16 y,
105
 
                                       Sint16 rx, Sint16 ry, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
106
 
/* Filled Pie */
107
 
 
108
 
    int filledpieColor(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad,
109
 
                                    Sint16 start, Sint16 end, Uint32 color);
110
 
    int filledpieRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, Sint16 rad,
111
 
                                   Sint16 start, Sint16 end, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
112
 
 
113
 
/* Polygon */
114
 
 
115
 
    int polygonColor(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, Uint32 color);
116
 
    int polygonRGBA(SDL_Surface * dst, Sint16 * vx, Sint16 * vy,
117
 
                                 int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
118
 
 
119
 
/* AA-Polygon */
120
 
 
121
 
    int aapolygonColor(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, Uint32 color);
122
 
    int aapolygonRGBA(SDL_Surface * dst, Sint16 * vx, Sint16 * vy,
123
 
                                   int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
124
 
 
125
 
/* Filled Polygon */
126
 
 
127
 
    int filledPolygonColor(SDL_Surface * dst, Sint16 * vx, Sint16 * vy, int n, int color);
128
 
    int filledPolygonRGBA(SDL_Surface * dst, Sint16 * vx,
129
 
                                       Sint16 * vy, int n, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
130
 
 
131
 
/* 8x8 Characters/Strings */
132
 
 
133
 
    int characterColor(SDL_Surface * dst, Sint16 x, Sint16 y, char c, Uint32 color);
134
 
    int characterRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, char c, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
135
 
    int stringColor(SDL_Surface * dst, Sint16 x, Sint16 y, char *c, Uint32 color);
136
 
    int stringRGBA(SDL_Surface * dst, Sint16 x, Sint16 y, char *c, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
137
 
 
138
 
/* Ends C function definitions when using C++ */
139
 
#ifdef __cplusplus
140
 
};
141
 
#endif
142
 
 
143
 
#endif                          /* _SDL_gfxPrimitives_h */