_________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
                   Stratagus - A free fantasy real time strategy game engine

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Functions | Variables
linedraw.cpp File Reference
#include "stratagus.h"
#include "video.h"
#include "intern_video.h"

Namespaces

 linedraw_sdl
 
 linedraw_gl
 

Functions

static void linedraw_sdl::VideoDoDrawPixel16 (Uint32 color, int x, int y)
 
void linedraw_sdl::VideoDrawPixel16 (Uint32 color, int x, int y)
 
static void linedraw_sdl::VideoDoDrawPixel32 (Uint32 color, int x, int y)
 
void linedraw_sdl::VideoDrawPixel32 (Uint32 color, int x, int y)
 
static void linedraw_sdl::VideoDoDrawTransPixel16 (Uint32 color, int x, int y, unsigned char alpha)
 
void linedraw_sdl::VideoDrawTransPixel16 (Uint32 color, int x, int y, unsigned char alpha)
 
static void linedraw_sdl::VideoDoDrawTransPixel32 (Uint32 color, int x, int y, unsigned char alpha)
 
void linedraw_sdl::VideoDrawTransPixel32 (Uint32 color, int x, int y, unsigned char alpha)
 
static void linedraw_sdl::VideoDoDrawPixelClip (Uint32 color, int x, int y)
 
void linedraw_sdl::DrawPixelClip (Uint32 color, int x, int y)
 
static void linedraw_sdl::VideoDoDrawTransPixelClip (Uint32 color, int x, int y, unsigned char alpha)
 
void linedraw_sdl::DrawTransPixelClip (Uint32 color, int x, int y, unsigned char alpha)
 
void linedraw_sdl::DrawVLine (Uint32 color, int x, int y, int height)
 
void linedraw_sdl::DrawTransVLine (Uint32 color, int x, int y, int height, unsigned char alpha)
 
void linedraw_sdl::DrawVLineClip (Uint32 color, int x, int y, int height)
 
void linedraw_sdl::DrawTransVLineClip (Uint32 color, int x, int y, int height, unsigned char alpha)
 
void linedraw_sdl::DrawHLine (Uint32 color, int x, int y, int width)
 
void linedraw_sdl::DrawHLineClip (Uint32 color, int x, int y, int width)
 
void linedraw_sdl::DrawTransHLine (Uint32 color, int x, int y, int width, unsigned char alpha)
 
void linedraw_sdl::DrawTransHLineClip (Uint32 color, int x, int y, int width, unsigned char alpha)
 
void linedraw_sdl::DrawLine (Uint32 color, int sx, int sy, int dx, int dy)
 
void linedraw_sdl::DrawLineClip (Uint32 color, int sx, int sy, int dx, int dy)
 
void linedraw_sdl::DrawTransLine (Uint32 color, int sx, int sy, int dx, int dy, unsigned char)
 
void linedraw_sdl::DrawTransLineClip (Uint32 color, int sx, int sy, int dx, int dy, unsigned char)
 
void linedraw_sdl::DrawRectangle (Uint32 color, int x, int y, int w, int h)
 
void linedraw_sdl::DrawRectangleClip (Uint32 color, int x, int y, int w, int h)
 
void linedraw_sdl::DrawTransRectangle (Uint32 color, int x, int y, int w, int h, unsigned char alpha)
 
void linedraw_sdl::DrawTransRectangleClip (Uint32 color, int x, int y, int w, int h, unsigned char alpha)
 
void linedraw_sdl::FillRectangle (Uint32 color, int x, int y, int w, int h)
 
void linedraw_sdl::FillRectangleClip (Uint32 color, int x, int y, int w, int h)
 
void linedraw_sdl::FillTransRectangle (Uint32 color, int x, int y, int w, int h, unsigned char alpha)
 
void linedraw_sdl::FillTransRectangleClip (Uint32 color, int x, int y, int w, int h, unsigned char alpha)
 
void linedraw_sdl::DrawCircle (Uint32 color, int x, int y, int r)
 
void linedraw_sdl::DrawTransCircle (Uint32 color, int x, int y, int r, unsigned char alpha)
 
void linedraw_sdl::DrawCircleClip (Uint32 color, int x, int y, int r)
 
void linedraw_sdl::DrawTransCircleClip (Uint32 color, int x, int y, int r, unsigned char alpha)
 
void linedraw_sdl::FillCircle (Uint32 color, int x, int y, int r)
 
void linedraw_sdl::FillTransCircle (Uint32 color, int x, int y, int r, unsigned char alpha)
 
void linedraw_sdl::FillCircleClip (Uint32 color, int x, int y, int r)
 
void linedraw_sdl::FillTransCircleClip (Uint32 color, int x, int y, int r, unsigned char alpha)
 
void linedraw_sdl::InitLineDraw ()
 Init line draw. More...
 
void linedraw_gl::DrawPixel (Uint32 color, int x, int y)
 
void linedraw_gl::DrawTransPixel (Uint32 color, int x, int y, unsigned char alpha)
 
void linedraw_gl::DrawPixelClip (Uint32 color, int x, int y)
 
void linedraw_gl::DrawTransPixelClip (Uint32 color, int x, int y, unsigned char alpha)
 
void linedraw_gl::DrawHLine (Uint32 color, int x, int y, int width)
 
void linedraw_gl::DrawTransHLine (Uint32 color, int x, int y, int width, unsigned char alpha)
 
void linedraw_gl::DrawHLineClip (Uint32 color, int x, int y, int width)
 
void linedraw_gl::DrawTransHLineClip (Uint32 color, int x, int y, int width, unsigned char alpha)
 
void linedraw_gl::DrawVLine (Uint32 color, int x, int y, int height)
 
void linedraw_gl::DrawTransVLine (Uint32 color, int x, int y, int height, unsigned char alpha)
 
void linedraw_gl::DrawVLineClip (Uint32 color, int x, int y, int height)
 
void linedraw_gl::DrawTransVLineClip (Uint32 color, int x, int y, int height, unsigned char alpha)
 
void linedraw_gl::DrawLine (Uint32 color, int x1, int y1, int x2, int y2)
 
static int linedraw_gl::ClipCodeLine (int x, int y)
 
static int linedraw_gl::LineIsUnclippedOnSameSide (int code1, int code2)
 
static int linedraw_gl::LineIsUnclipped (int code1, int code2)
 
void linedraw_gl::DrawLineClip (Uint32 color, int x1, int y1, int x2, int y2)
 
void linedraw_gl::DrawTransLine (Uint32 color, int sx, int sy, int dx, int dy, unsigned char)
 
void linedraw_gl::DrawTransLineClip (Uint32 color, int sx, int sy, int dx, int dy, unsigned char)
 
void linedraw_gl::DrawRectangle (Uint32 color, int x, int y, int w, int h)
 
void linedraw_gl::DrawTransRectangle (Uint32 color, int x, int y, int w, int h, unsigned char alpha)
 
void linedraw_gl::DrawRectangleClip (Uint32 color, int x, int y, int w, int h)
 
void linedraw_gl::DrawTransRectangleClip (Uint32 color, int x, int y, int w, int h, unsigned char alpha)
 
void linedraw_gl::FillRectangle (Uint32 color, int x, int y, int w, int h)
 
void linedraw_gl::FillTransRectangle (Uint32 color, int x, int y, int w, int h, unsigned char alpha)
 
void linedraw_gl::FillRectangleClip (Uint32 color, int x, int y, int w, int h)
 
void linedraw_gl::FillTransRectangleClip (Uint32 color, int x, int y, int w, int h, unsigned char alpha)
 
void linedraw_gl::DrawCircle (Uint32 color, int x, int y, int radius)
 
void linedraw_gl::DrawCircleClip (Uint32 color, int x, int y, int radius)
 
void linedraw_gl::DrawTransCircle (Uint32 color, int x, int y, int radius, unsigned char alpha)
 
void linedraw_gl::DrawTransCircleClip (Uint32 color, int x, int y, int radius, unsigned char alpha)
 
void linedraw_gl::FillCircle (Uint32 color, int x, int y, int radius)
 
void linedraw_gl::FillTransCircle (Uint32 color, int x, int y, int radius, unsigned char alpha)
 
void linedraw_gl::FillCircleClip (Uint32 color, int x, int y, int radius)
 
void linedraw_gl::FillTransCircleClip (Uint32 color, int x, int y, int radius, unsigned char alpha)
 
void linedraw_gl::InitLineDraw ()
 Init line draw. More...
 

Variables

void(* linedraw_sdl::VideoDrawPixel )(Uint32 color, int x, int y)
 
static void(* linedraw_sdl::VideoDoDrawPixel )(Uint32 color, int x, int y)
 
void(* linedraw_sdl::VideoDrawTransPixel )(Uint32 color, int x, int y, unsigned char alpha)
 
static void(* linedraw_sdl::VideoDoDrawTransPixel )(Uint32 color, int x, int y, unsigned char alpha)
 

linedraw.cpp - The general linedraw functions.

#define ClipCodeInside   0
 
#define ClipCodeAbove   1
 
#define ClipCodeBelow   2
 
#define ClipCodeLeft   4
 
#define ClipCodeRight   8
 
void InitLineDraw ()
 Init line draw. More...
 

Macro Definition Documentation

#define ClipCodeAbove   1
#define ClipCodeBelow   2
#define ClipCodeInside   0

Bitmask, denoting a position left/right/above/below clip rectangle (mainly used by VideoDrawLineClip)

#define ClipCodeLeft   4
#define ClipCodeRight   8

Function Documentation

void InitLineDraw ( )

Init line draw.

Initialize line draw

(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.