00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef LIQCLIPRECT_H
00027 #define LIQCLIPRECT_H
00028
00029
00030 #include "liqfont.h"
00031 #include "liqsketch.h"
00032 #include "liqimage.h"
00033
00034 typedef struct liqcliprect
00035 {
00036 int usagecount;
00037 int sx;
00038 int sy;
00039 int ex;
00040 int ey;
00041 liqimage *surface;
00042 } liqcliprect;
00043
00044
00045
00046
00047
00048
00049
00050 liqcliprect * liqcliprect_newfromimage( liqimage *surface);
00051
00052
00053
00054
00055
00056 liqcliprect * liqcliprect_new();
00057 liqcliprect * liqcliprect_hold(liqcliprect *self);
00058 void liqcliprect_release(liqcliprect *self);
00059 void liqcliprect_free(liqcliprect *self);
00060
00061 int liqcliprect_getx(liqcliprect *self);
00062 int liqcliprect_gety(liqcliprect *self);
00063 int liqcliprect_getw(liqcliprect *self);
00064 int liqcliprect_geth(liqcliprect *self);
00065
00066
00067
00068
00069
00070
00071
00072 inline void liqcliprect_shrink( liqcliprect *self,int sx,int sy,int ex,int ey);
00073 inline void liqcliprect_copy( liqcliprect *self,liqcliprect *other);
00074
00075 inline int liqcliprect_isvalid( liqcliprect *self);
00076
00077
00078
00079
00080
00081 void liqcliprect_print( liqcliprect *self,char *prefix);
00082
00083
00084
00085
00086
00087 inline void liqcliprect_drawclear( liqcliprect *self,unsigned char grey,unsigned char u,unsigned char v);
00088 void liqcliprect_drawpsetcolor( liqcliprect *self,int x, int y, unsigned char grey,unsigned char u,unsigned char v);
00089 inline void liqcliprect_drawpgetcolor( liqcliprect *self,int x1, int y1, unsigned char *grey,unsigned char *u,unsigned char *v);
00090
00091
00092
00093
00094
00095 void liqcliprect_drawlinerowcolor( liqcliprect *self,int x1, int y1, int x2, int y2, unsigned char grey,unsigned char u,unsigned char v);
00096 void liqcliprect_drawlinecolcolor( liqcliprect *self,int x1, int y1,int x2, int y2, unsigned char grey,unsigned char u,unsigned char v);
00097 void liqcliprect_drawlinecolor( liqcliprect *self,int x1, int y1, int x2, int y2, unsigned char grey,unsigned char u,unsigned char v);
00098 void liqcliprect_drawboxlinecolor( liqcliprect *self,int x,int y,int w,int h,unsigned char grey,unsigned char u,unsigned char v);
00099 void liqcliprect_drawboxfillcolor( liqcliprect *self,int x,int y,int w,int h,unsigned char grey,unsigned char u,unsigned char v);
00100
00101 void liqcliprect_drawcolorcube(liqcliprect *self,int x,int y,int w,int h,unsigned char grey);
00102
00103
00104
00105
00106
00107
00108 inline void liqcliprect_drawglyph_grey( liqcliprect *self,liqfont *font,int x,int y,unsigned char glyph);
00109 int liqcliprect_drawtext( liqcliprect *self,liqfont *font,int xs,int ys,char *data);
00110 int liqcliprect_drawtextn( liqcliprect *self,liqfont *font,int xs,int ys,char *data,int datalen);
00111 void liqcliprect_drawtextcentredon( liqcliprect *self,liqfont *font,int cx,int cy,char *text);
00112 void liqcliprect_drawtextcentredonlimit(liqcliprect *self,liqfont *font,int cx,int cy,char *text,int availablewidth);
00113 void liqcliprect_drawtextinside( liqcliprect *self,liqfont *font,int x,int y,int w,int h,char *text,int alignx);
00114
00115
00116
00117
00118
00119
00120
00121 inline void liqcliprect_drawglyph_color(liqcliprect *self,liqfont *font,int x,int y,unsigned char glyph,unsigned char grey,unsigned char u,unsigned char v);
00122 int liqcliprect_drawtext_color(liqcliprect *self,liqfont *font,int xs,int ys,char *data,unsigned char grey,unsigned char u,unsigned char v);
00123 int liqcliprect_drawtextn_color(liqcliprect *self,liqfont *font,int xs,int ys,char *data,int datalen,unsigned char grey,unsigned char u,unsigned char v);
00124 void liqcliprect_drawtextcentredon_color(liqcliprect *self,liqfont *font,int cx,int cy,char *text,unsigned char grey,unsigned char u,unsigned char v);
00125 void liqcliprect_drawtextcentredonlimit_color(liqcliprect *self,liqfont *font,int cx,int cy,char *text,int availablewidth,unsigned char grey,unsigned char u,unsigned char v);
00126 void liqcliprect_drawtextinside_color(liqcliprect *self,liqfont *font,int x,int y,int w,int h,char *text,int alignx,unsigned char grey,unsigned char u,unsigned char v);
00127
00128
00129
00130
00131
00132
00133
00134 void liqcliprect_drawsketch( liqcliprect *self,liqsketch *page,int l,int t,int w,int h,int drawmode);
00135
00136
00137
00138
00139
00140
00141
00142 inline void liqcliprect_drawimagecolor( liqcliprect *self,liqimage *image,int x,int y,int w,int h, int aspectlock);
00143 inline void liqcliprect_drawimageblendcolor( liqcliprect *self,liqimage *image,int x,int y,int w,int h,char blend,int aspectlock);
00144
00145 #endif