opc.h File Reference

2D Bitmap graphic primitives More...

#include "rect.h"

Include dependency graph for opc.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  OPC
 The basic unit of 2D graphical operations. More...
struct  OPCShape
 A transparent-packed 2D shape definition Codes (signed char code array): -1~-127 Skip -128: End line 0: End shape 1~MAX_DUMP: Copy MAX_DUMP~127: Fill If 'code' is not NULL, and first 'code' is 0, data is packed somehow. More...

Defines

#define OPC_GetOrigin(opc)   ((opc)->origin)
#define OPC_GetPitch(opc)   ((opc)->pitch)
#define OPC_GetClip(opc)   ((opc)->clip)
#define OPC_Init_Basic(opc, org, lineOff, cl, ct, cr, cb)
 Initialize each member from a discreet list of parameters.
#define OPC_Init_SDL_Surface(opc, sdl)   OPC_Init_Basic( opc, (sdl)->pixels, (sdl)->pitch, (sdl)->clip_rect.x, (sdl)->clip_rect.y, (sdl)->clip_rect.x + (sdl)->clip_rect.w, (sdl)->clip_rect.y + (sdl)->clip_rect.h )
 Initialize from SDL (http://libsdl.org).


Detailed Description

2D Bitmap graphic primitives

Author:
David Mace

Definition in file opc.h.


Define Documentation

#define OPC_GetClip ( opc   )     ((opc)->clip)

Get clipping region for OPC

Definition at line 25 of file opc.h.

#define OPC_GetOrigin ( opc   )     ((opc)->origin)

Get origin pointer for OPC

Definition at line 23 of file opc.h.

#define OPC_GetPitch ( opc   )     ((opc)->pitch)

Get byte offset from current line to next lower line for OPC

Definition at line 24 of file opc.h.

#define OPC_Init_Basic ( opc,
org,
lineOff,
cl,
ct,
cr,
cb   ) 

Value:

{\
    (opc)->clip.left = (cl); (opc)->clip.top = (ct); (opc)->clip.right = (cr); (opc)->clip.bottom = (cb);\
    (opc)->pitch = (lineOff);\
    (opc)->origin = (uint8*)(org) - ((opc)->pitch*(ct)) - (sizeof(PIXEL)*(cl));\
}
Initialize each member from a discreet list of parameters.

Parameters:
opc OPC to init, at {cl,ct}
org Pointer to buffer
lineOff Width of buffer
cl,ct,cr,cb 

Definition at line 34 of file opc.h.


Generated on Fri Jan 2 15:28:35 2009 for Squat by  doxygen 1.5.6