00001 #ifndef ZOPC_H
00002 #define ZOPC_H
00003
00014 #ifndef PIXEL
00015 #error Pixel format must be specified.
00016 #endif
00017
00018 #ifndef MAX_LINES
00019 #error Height of target area must be specified
00020 #endif
00021
00022 #ifndef FIFO_H
00023 #include "fifo.h"
00024 #endif
00025
00026 #ifndef OPC_H
00027 #include "opc.h"
00028 #endif
00029
00030 #ifndef ZOPC_NAME
00031 #define ZOPC_NAME ZOPC
00032 #endif
00033
00034 #ifndef ZOPC_NAMING
00035 #define ZOPC_NAMING(label) ppConcat(ZOPC_,label)
00036 #endif
00037
00038 #ifndef ZTYPE
00039 #define ZTYPE uint16
00040 #endif
00041
00042 #ifndef POOL_SIZE
00043 #define POOL_SIZE MAX_LINES * 10
00044 #endif
00045
00046 typedef struct ZOPC_NAMING(span)
00047 {
00048 ZTYPE z;
00049 ZTYPE len;
00050 } ZOPC_NAMING(span);
00051 typedef struct ZOPC_NAMING(line)
00052 {
00053 ZOPC_NAMING(span)* span;
00054 size_t count;
00055 } ZOPC_NAMING(line);
00056
00057 typedef struct ZOPC_NAME
00058 {
00059 OPC opc;
00060 ZOPC_NAMING(line)* yspan[MAX_LINES];
00061 FIFO_decl(ZOPC_NAMING(span),POOL_SIZE, fifo);
00062 } ZOPC_NAME;
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095 void ZOPC_NAMING(init)( ZOPC_NAME* zl, void* origin, int pitch, const Rect* clip );
00096 void ZOPC_NAMING(clear)( ZOPC_NAME* zl );
00097
00098 void ZOPC_NAMING(blit)( const OPC* dst, int x, int y, ZOPC_NAME* zl, int zBegin, int zEnd );
00099
00100
00101
00102
00103
00104
00105 void ZOPC_NAMING(add_Rect)( ZOPC_NAME* zl, int z, const Rect* rect );
00106 void ZOPC_NAMING(add_OPC)( ZOPC_NAME* zl, int z, const OPC* shape, PIXEL transparent );
00107 void ZOPC_NAMING(add_OPCShape)( ZOPC_NAME* zl, int z, const OPCShape* shape );
00108
00109
00110 void ZOPC_NAMING(rep_Rect)( ZOPC_NAME* zl, int z, const Rect* rect );
00111 void ZOPC_NAMING(rep_OPC)( ZOPC_NAME* zl, int z, const OPC* shape, PIXEL transparent );
00112 void ZOPC_NAMING(rep_OPCShape)( ZOPC_NAME* zl, int z, const OPCShape* shape );
00113
00114
00115 void ZOPC_NAMING(del_Rect)( ZOPC_NAME* zl, const Rect* rect );
00116 void ZOPC_NAMING(del_OPC)( ZOPC_NAME* zl, const OPC* shape, PIXEL transparent );
00117 void ZOPC_NAMING(del_OPCShape)( ZOPC_NAME* zl, const OPCShape* shape );
00118
00119
00120 void ZOPC_NAMING(HLine)( const ZOPC_NAME* dst, int z, int x, int y, int wide, OPC_NAMING(Pixel) color );
00121 void ZOPC_NAMING(VLine)( const ZOPC_NAME* dst, int z, int x, int y, int high, OPC_NAMING(Pixel) color );
00122 void ZOPC_NAMING(HCopy)( const ZOPC_NAME* dst, int z, int x, int y, int wide, const OPC_NAMING(Pixel)* src );
00123 void ZOPC_NAMING(Blit)( const ZOPC_NAME* dst, int z, const Rect* rdst, const OPC* src, int sx, int sy );
00124 void ZOPC_NAMING(Stamp)( const ZOPC_NAME* dst, int dz, int dx, int dy, const OPC* src );
00125 void ZOPC_NAMING(Fill)( const ZOPC_NAME* dst, int z, const Rect* rdst, OPC_NAMING(Pixel) color );
00126 void ZOPC_NAMING(Shape)( const ZOPC_NAME* dst, int z, const OPCShape* shape, int x, int y );
00127 void ZOPC_NAMING(Shape_Mask)( const ZOPC_NAME* dst, int z, const OPCShape* shape, int x, int y, OPC_NAMING(Pixel) color );
00128
00129 #endif