_________ __ __
/ _____// |_____________ _/ |______ ____ __ __ ______
\_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/
/ \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \
/_______ /|__| |__| (____ /__| (____ /\___ /|____//____ >
\/ \/ \//_____/ \/
______________________ ______________________
T H E W A R B E G I N S
Stratagus - A free fantasy real time strategy game engine
Functions | |
| void | DrawPixel (Uint32 color, int x, int y) |
| void | DrawTransPixel (Uint32 color, int x, int y, unsigned char alpha) |
| void | DrawPixelClip (Uint32 color, int x, int y) |
| void | DrawTransPixelClip (Uint32 color, int x, int y, unsigned char alpha) |
| void | DrawHLine (Uint32 color, int x, int y, int width) |
| void | DrawTransHLine (Uint32 color, int x, int y, int width, unsigned char alpha) |
| void | DrawHLineClip (Uint32 color, int x, int y, int width) |
| void | DrawTransHLineClip (Uint32 color, int x, int y, int width, unsigned char alpha) |
| void | DrawVLine (Uint32 color, int x, int y, int height) |
| void | DrawTransVLine (Uint32 color, int x, int y, int height, unsigned char alpha) |
| void | DrawVLineClip (Uint32 color, int x, int y, int height) |
| void | DrawTransVLineClip (Uint32 color, int x, int y, int height, unsigned char alpha) |
| void | DrawLine (Uint32 color, int x1, int y1, int x2, int y2) |
| static int | ClipCodeLine (int x, int y) |
| static int | LineIsUnclippedOnSameSide (int code1, int code2) |
| static int | LineIsUnclipped (int code1, int code2) |
| void | DrawLineClip (Uint32 color, int x1, int y1, int x2, int y2) |
| void | DrawTransLine (Uint32 color, int sx, int sy, int dx, int dy, unsigned char) |
| void | DrawTransLineClip (Uint32 color, int sx, int sy, int dx, int dy, unsigned char) |
| void | DrawRectangle (Uint32 color, int x, int y, int w, int h) |
| void | DrawTransRectangle (Uint32 color, int x, int y, int w, int h, unsigned char alpha) |
| void | DrawRectangleClip (Uint32 color, int x, int y, int w, int h) |
| void | DrawTransRectangleClip (Uint32 color, int x, int y, int w, int h, unsigned char alpha) |
| void | FillRectangle (Uint32 color, int x, int y, int w, int h) |
| void | FillTransRectangle (Uint32 color, int x, int y, int w, int h, unsigned char alpha) |
| void | FillRectangleClip (Uint32 color, int x, int y, int w, int h) |
| void | FillTransRectangleClip (Uint32 color, int x, int y, int w, int h, unsigned char alpha) |
| void | DrawCircle (Uint32 color, int x, int y, int radius) |
| void | DrawCircleClip (Uint32 color, int x, int y, int radius) |
| void | DrawTransCircle (Uint32 color, int x, int y, int radius, unsigned char alpha) |
| void | DrawTransCircleClip (Uint32 color, int x, int y, int radius, unsigned char alpha) |
| void | FillCircle (Uint32 color, int x, int y, int radius) |
| void | FillTransCircle (Uint32 color, int x, int y, int radius, unsigned char alpha) |
| void | FillCircleClip (Uint32 color, int x, int y, int radius) |
| void | FillTransCircleClip (Uint32 color, int x, int y, int radius, unsigned char alpha) |
| void | InitLineDraw () |
| Init line draw. More... | |
|
static |
Delivers bitmask denoting given point is left/right/above/below clip rectangle, used for faster determinination of clipped position.
| x | pixel's x position (not restricted to screen width) |
| y | pixel's y position (not restricted to screen height) |
| void linedraw_gl::DrawCircle | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | radius | ||
| ) |
Draw circle.
| color | color |
| x | Center x coordinate on the screen |
| y | Center y coordinate on the screen |
| radius | radius of circle |
| void linedraw_gl::DrawCircleClip | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | radius | ||
| ) |
Draw circle clipped.
| color | color |
| x | Center x coordinate on the screen |
| y | Center y coordinate on the screen |
| radius | radius of circle |
| void linedraw_gl::DrawHLine | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | width | ||
| ) |
Draw horizontal line unclipped.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| width | width of line (0=don't draw). |
| void linedraw_gl::DrawHLineClip | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | width | ||
| ) |
Draw horizontal line clipped.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| width | width of line (0=don't draw). |
| void linedraw_gl::DrawLine | ( | Uint32 | color, |
| int | x1, | ||
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
Draw line unclipped into 32bit framebuffer.
| color | color |
| x1 | Source x coordinate on the screen |
| y1 | Source y coordinate on the screen |
| x2 | Destination x coordinate on the screen |
| y2 | Destination y coordinate on the screen |
| void linedraw_gl::DrawLineClip | ( | Uint32 | color, |
| int | x1, | ||
| int | y1, | ||
| int | x2, | ||
| int | y2 | ||
| ) |
Draw line clipped. Based on Sutherland-Cohen clipping technique (Replaces Liang/Barksy clipping algorithm in CVS version 1.18, which might be faster, but that one contained some BUGs)
| color | color |
| x1 | Source x coordinate on the screen |
| y1 | Source y coordinate on the screen |
| x2 | Destination x coordinate on the screen |
| y2 | Destination y coordinate on the screen |
| void linedraw_gl::DrawPixel | ( | Uint32 | color, |
| int | x, | ||
| int | y | ||
| ) |
Draw pixel unclipped.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| void linedraw_gl::DrawPixelClip | ( | Uint32 | color, |
| int | x, | ||
| int | y | ||
| ) |
Draw pixel clipped to current clip setting.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| void linedraw_gl::DrawRectangle | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h | ||
| ) |
Draw rectangle.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| h | height of rectangle (0=don't draw). |
| w | width of rectangle (0=don't draw). |
| void linedraw_gl::DrawRectangleClip | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h | ||
| ) |
Draw rectangle clipped.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| h | height of rectangle (0=don't draw). |
| w | width of rectangle (0=don't draw). |
| void linedraw_gl::DrawTransCircle | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | radius, | ||
| unsigned char | alpha | ||
| ) |
Draw translucent circle.
| color | color |
| x | Center x coordinate on the screen |
| y | Center y coordinate on the screen |
| radius | radius of circle |
| alpha | alpha value of pixels. |
| void linedraw_gl::DrawTransCircleClip | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | radius, | ||
| unsigned char | alpha | ||
| ) |
Draw translucent circle clipped.
| color | color |
| x | Center x coordinate on the screen |
| y | Center y coordinate on the screen |
| radius | radius of circle |
| alpha | alpha value of pixels. |
| void linedraw_gl::DrawTransHLine | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | width, | ||
| unsigned char | alpha | ||
| ) |
Draw translucent horizontal line unclipped.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| width | width of line (0=don't draw). |
| alpha | alpha value of pixels. |
| void linedraw_gl::DrawTransHLineClip | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | width, | ||
| unsigned char | alpha | ||
| ) |
Draw translucent horizontal line clipped.
| color | Color index |
| x | X pixel coordinate on the screen |
| y | Y c pixeloordinate on the screen |
| width | Width of line (0=don't draw) |
| alpha | Alpha value of pixels |
| void linedraw_gl::DrawTransLine | ( | Uint32 | color, |
| int | sx, | ||
| int | sy, | ||
| int | dx, | ||
| int | dy, | ||
| unsigned | char | ||
| ) |
Draw a transparent line
| void linedraw_gl::DrawTransLineClip | ( | Uint32 | color, |
| int | sx, | ||
| int | sy, | ||
| int | dx, | ||
| int | dy, | ||
| unsigned | char | ||
| ) |
Draw a transparent line clipped
| void linedraw_gl::DrawTransPixel | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| unsigned char | alpha | ||
| ) |
Draw translucent pixel unclipped.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| alpha | alpha value of pixel. |
| void linedraw_gl::DrawTransPixelClip | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| unsigned char | alpha | ||
| ) |
Draw translucent pixel clipped to current clip setting.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| alpha | alpha value of pixel. |
| void linedraw_gl::DrawTransRectangle | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h, | ||
| unsigned char | alpha | ||
| ) |
Draw translucent rectangle.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| h | height of rectangle (0=don't draw). |
| w | width of rectangle (0=don't draw). |
| alpha | alpha value of pixel. |
| void linedraw_gl::DrawTransRectangleClip | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h, | ||
| unsigned char | alpha | ||
| ) |
Draw translucent rectangle clipped.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| h | height of rectangle (0=don't draw). |
| w | width of rectangle (0=don't draw). |
| alpha | alpha value of pixels. |
| void linedraw_gl::DrawTransVLine | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | height, | ||
| unsigned char | alpha | ||
| ) |
Draw translucent vertical line unclipped.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| height | height of line (0=don't draw). |
| alpha | alpha value of pixels. |
| void linedraw_gl::DrawTransVLineClip | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | height, | ||
| unsigned char | alpha | ||
| ) |
Draw translucent vertical line clipped.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| height | height of line (0=don't draw). |
| alpha | alpha value of pixels. |
| void linedraw_gl::DrawVLine | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | height | ||
| ) |
Draw vertical line unclipped.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| height | height of line (0=don't draw). |
| void linedraw_gl::DrawVLineClip | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | height | ||
| ) |
Draw vertical line clipped.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| height | height of line (0=don't draw). |
| void linedraw_gl::FillCircle | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | radius | ||
| ) |
Fill circle.
| color | color |
| x | Center x coordinate on the screen |
| y | Center y coordinate on the screen |
| radius | radius of circle |
| void linedraw_gl::FillCircleClip | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | radius | ||
| ) |
Fill circle clipped.
| color | color |
| x | Center x coordinate on the screen |
| y | Center y coordinate on the screen |
| radius | radius of circle |
| void linedraw_gl::FillRectangle | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h | ||
| ) |
Fill rectangle.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| h | height of rectangle (0=don't draw). |
| w | width of rectangle (0=don't draw). |
| void linedraw_gl::FillRectangleClip | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h | ||
| ) |
Fill rectangle clipped.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| h | height of rectangle (0=don't draw). |
| w | width of rectangle (0=don't draw). |
| void linedraw_gl::FillTransCircle | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | radius, | ||
| unsigned char | alpha | ||
| ) |
Fill translucent circle clipped.
| color | color |
| x | Center x coordinate on the screen |
| y | Center y coordinate on the screen |
| radius | radius of circle |
| alpha | alpha value of pixels. |
| void linedraw_gl::FillTransCircleClip | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | radius, | ||
| unsigned char | alpha | ||
| ) |
Fill translucent circle clipped.
| color | color |
| x | Center x coordinate on the screen |
| y | Center y coordinate on the screen |
| radius | radius of circle |
| alpha | alpha value of pixels. |
| void linedraw_gl::FillTransRectangle | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h, | ||
| unsigned char | alpha | ||
| ) |
Draw translucent rectangle.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| h | height of rectangle (0=don't draw). |
| w | width of rectangle (0=don't draw). |
| alpha | alpha value of pixel. |
| void linedraw_gl::FillTransRectangleClip | ( | Uint32 | color, |
| int | x, | ||
| int | y, | ||
| int | w, | ||
| int | h, | ||
| unsigned char | alpha | ||
| ) |
Fill rectangle translucent clipped.
| color | color |
| x | x coordinate on the screen |
| y | y coordinate on the screen |
| h | height of rectangle (0=don't draw). |
| w | width of rectangle (0=don't draw). |
| alpha | alpha value of pixels. |
| void linedraw_gl::InitLineDraw | ( | ) |
Init line draw.
Initialize line draw
|
static |
Denotes part of (or entire) line located outside clip rectangle (point 1 and/or 2 is outside clip rectangle)
| code1 | ClipCode of one point of line |
| code2 | ClipCode of second point of line |
|
static |
Denotes entire line located at the same side outside clip rectangle (point 1 and 2 are both as left/right/above/below the clip rectangle)
| code1 | ClipCode of one point of line |
| code2 | ClipCode of second point of line |
1.8.9.1
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.