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
00073
00074 inline void liqcliprect_shrink( liqcliprect *self,int sx,int sy,int ex,int ey);
00075 inline void liqcliprect_copy( liqcliprect *self,liqcliprect *other);
00076
00077 inline int liqcliprect_isvalid( liqcliprect *self);
00078
00079
00080
00081
00082
00083 void liqcliprect_print( liqcliprect *self,char *prefix);
00084
00085
00086
00087
00088
00089 inline void liqcliprect_drawclear( liqcliprect *self,unsigned char grey,unsigned char u,unsigned char v);
00090 void liqcliprect_drawpsetcolor( liqcliprect *self,int x, int y, unsigned char grey,unsigned char u,unsigned char v);
00091 inline void liqcliprect_drawpgetcolor( liqcliprect *self,int x1, int y1, unsigned char *grey,unsigned char *u,unsigned char *v);
00092
00093
00094
00095
00096
00097 void liqcliprect_drawlinerowcolor( liqcliprect *self,int x1, int y1, int x2, int y2, unsigned char grey,unsigned char u,unsigned char v);
00098 void liqcliprect_drawlinecolcolor( liqcliprect *self,int x1, int y1,int x2, int y2, unsigned char grey,unsigned char u,unsigned char v);
00099 void liqcliprect_drawlinecolor( liqcliprect *self,int x1, int y1, int x2, int y2, unsigned char grey,unsigned char u,unsigned char v);
00100 void liqcliprect_drawboxlinecolor( liqcliprect *self,int x,int y,int w,int h,unsigned char grey,unsigned char u,unsigned char v);
00101 void liqcliprect_drawboxfillcolor( liqcliprect *self,int x,int y,int w,int h,unsigned char grey,unsigned char u,unsigned char v);
00102 void liqcliprect_drawboxwashcolor( liqcliprect *self,int x,int y,int w,int h,unsigned char u,unsigned char v);
00103
00104 void liqcliprect_drawcolorcube(liqcliprect *self,int x,int y,int w,int h,unsigned char grey);
00105 void liqcliprect_drawboxfadeoutcolor(liqcliprect *self,int x,int y,int w,int h,unsigned char grey,unsigned char u,unsigned char v,unsigned char spread);
00106
00107
00108
00109
00110
00111
00112 inline void liqcliprect_drawglyph_grey( liqcliprect *self,liqfont *font,int x,int y,unsigned char glyph);
00113 int liqcliprect_drawtext( liqcliprect *self,liqfont *font,int xs,int ys,char *data);
00114 int liqcliprect_drawtextn( liqcliprect *self,liqfont *font,int xs,int ys,char *data,int datalen);
00115 void liqcliprect_drawtextcentredon( liqcliprect *self,liqfont *font,int cx,int cy,char *text);
00116 void liqcliprect_drawtextcentredonlimit(liqcliprect *self,liqfont *font,int cx,int cy,char *text,int availablewidth);
00117 void liqcliprect_drawtextinside( liqcliprect *self,liqfont *font,int x,int y,int w,int h,char *text,int alignx);
00118
00119
00120
00121
00122
00123
00124
00125 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);
00126 int liqcliprect_drawtext_color(liqcliprect *self,liqfont *font,int xs,int ys,char *data,unsigned char grey,unsigned char u,unsigned char v);
00127 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);
00128 void liqcliprect_drawtextcentredon_color(liqcliprect *self,liqfont *font,int cx,int cy,char *text,unsigned char grey,unsigned char u,unsigned char v);
00129 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);
00130 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);
00131
00132
00133
00134
00135
00136
00137
00138 void liqcliprect_drawsketch( liqcliprect *self,liqsketch *page,int l,int t,int w,int h,int drawmode);
00139
00140
00141
00142
00143
00144
00145
00146 inline void liqcliprect_drawimagecolor( liqcliprect *self,liqimage *image,int x,int y,int w,int h, int aspectlock);
00147 inline void liqcliprect_drawimageblendcolor( liqcliprect *self,liqimage *image,int x,int y,int w,int h,char blend,int aspectlock);
00148
00149 #endif