LMMS
Loading...
Searching...
No Matches
lice.h
Go to the documentation of this file.
1#ifndef _LICE_H
2#define _LICE_H
3
4/*
5 Cockos WDL - LICE - Lightweight Image Compositing Engine
6
7 Copyright (C) 2007 and later, Cockos Incorporated
8 Portions Copyright (C) 2007 "schwa"
9
10 This software is provided 'as-is', without any express or implied
11 warranty. In no event will the authors be held liable for any damages
12 arising from the use of this software.
13
14 Permission is granted to anyone to use this software for any purpose,
15 including commercial applications, and to alter it and redistribute it
16 freely, subject to the following restrictions:
17
18 1. The origin of this software must not be misrepresented; you must not
19 claim that you wrote the original software. If you use this software
20 in a product, an acknowledgment in the product documentation would be
21 appreciated but is not required.
22 2. Altered source versions must be plainly marked as such, and must not be
23 misrepresented as being the original software.
24 3. This notice may not be removed or altered from any source distribution.
25
26*/
27
28#ifdef _WIN32
29#include <windows.h>
30#else
31#include "../swell/swell-types.h" // use SWELL on other systems
32#endif
33
34
35// one of these can be defined in your project if you choose:
36//#define LICE_FAVOR_SPEED // optimizes some stuff that doesnt seem to benefit much (like LICE_DeltaBlit/LICE_RotatedBlit/LICE_TransformBlit)
37// (nothing) default probably good overall
38//#define LICE_FAVOR_SIZE // reduces code size of normal/scaled blit functions
39//#define LICE_FAVOR_SIZE_EXTREME // same as LICE_FAVOR_SIZE w/ smaller gains with bigger perf penalties (solid fills etc)
40
41#ifdef LICE_FAVOR_SPEED
42 #ifdef LICE_FAVOR_SIZE_EXTREME
43 #undef LICE_FAVOR_SIZE_EXTREME
44 #endif
45 #ifdef LICE_FAVOR_SIZE
46 #undef LICE_FAVOR_SIZE
47 #endif
48#endif
49#if defined(LICE_FAVOR_SIZE_EXTREME) && !defined(LICE_FAVOR_SIZE)
50#define LICE_FAVOR_SIZE
51#endif
52
53
54typedef unsigned int LICE_pixel;
55typedef unsigned char LICE_pixel_chan;
56
57#define LICE_RGBA(r,g,b,a) (((b)&0xff)|(((g)&0xff)<<8)|(((r)&0xff)<<16)|(((a)&0xff)<<24))
58#define LICE_GETB(v) ((v)&0xff)
59#define LICE_GETG(v) (((v)>>8)&0xff)
60#define LICE_GETR(v) (((v)>>16)&0xff)
61#define LICE_GETA(v) (((v)>>24)&0xff)
62
63#if defined(__APPLE__) && defined(__ppc__)
64#define LICE_PIXEL_A 0
65#define LICE_PIXEL_R 1
66#define LICE_PIXEL_G 2
67#define LICE_PIXEL_B 3
68#else
69#define LICE_PIXEL_B 0
70#define LICE_PIXEL_G 1
71#define LICE_PIXEL_R 2
72#define LICE_PIXEL_A 3
73#endif
74
75
76static inline LICE_pixel LICE_RGBA_FROMNATIVE(LICE_pixel col, int alpha=0)
77{
78 return LICE_RGBA(GetRValue(col),GetGValue(col),GetBValue(col),alpha);
79}
80
81// bitmap interface, and some built-in types (memory bitmap and system bitmap)
82
84{
85public:
86 virtual ~LICE_IBitmap() { }
87
88 virtual LICE_pixel *getBits()=0;
89 virtual int getWidth()=0;
90 virtual int getHeight()=0;
91 virtual int getRowSpan()=0; // includes any off-bitmap data
92 virtual bool isFlipped() { return false; }
93 virtual bool resize(int w, int h)=0;
94
95 virtual HDC getDC() { return 0; } // only sysbitmaps have to implement this
96
97
98 virtual INT_PTR Extended(int id, void* data) { return 0; }
99};
100
101#define LICE_EXT_SET_SCALING 0x2000 // data = int *, scaling is .8 fixed point. returns true if supported. affects LICE_*() draw operations
102#define LICE_EXT_GET_SCALING 0x2001 // data ignored, returns .8 fixed point, returns 0 if unscaled
103#define LICE_EXT_SET_ADVISORY_SCALING 0x2002 // data = int *, scaling is .8 fixed point. returns true if supported. does not affect draw operations
104#define LICE_EXT_GET_ADVISORY_SCALING 0x2003 // data ignored, returns .8 fixed point. returns 0 if unscaled
105#define LICE_EXT_GET_ANY_SCALING 0x2004 // data ignored, returns .8 fixed point, 0 if unscaled
106
107#define LICE_MEMBITMAP_ALIGNAMT 63
108
110{
111public:
112 LICE_MemBitmap(int w=0, int h=0, unsigned int linealign=4);
113 virtual ~LICE_MemBitmap();
114
115
116 // LICE_IBitmap interface
117 virtual LICE_pixel *getBits()
118 {
120 return (LICE_pixel *) (((UINT_PTR)m_fb + extra)&~extra);
121 }
122 virtual int getWidth() { return m_width; }
123 virtual int getHeight() { return m_height; }
124 virtual int getRowSpan() { return (m_width+m_linealign)&~m_linealign; }
125 virtual bool resize(int w, int h) { return __resize(w,h); } // returns TRUE if a resize occurred
126
127 // todo: LICE_EXT_SET_SCALING ?
128
129private:
130 bool __resize(int w, int h);
134 unsigned int m_linealign;
135};
136
138{
139public:
140 LICE_SysBitmap(int w=0, int h=0);
141 virtual ~LICE_SysBitmap();
142
143 // LICE_IBitmap interface
144 virtual LICE_pixel *getBits() { return m_bits; }
145 virtual int getWidth() { return m_width; }
146 virtual int getHeight() { return m_height; }
147 virtual int getRowSpan() { return m_allocw; };
148 virtual bool resize(int w, int h) { return __resize(w,h); } // returns TRUE if a resize occurred
149
150 virtual INT_PTR Extended(int id, void* data)
151 {
152 switch (id)
153 {
155 {
156 int sc = data && *(int*)data != 256 ? *(int *)data : 0;
157 if (sc < 0) sc = 0;
158 m_adv_scaling = sc;
159 }
160 return 1;
162 {
163 int sc = data && *(int*)data != 256 ? *(int *)data : 0;
164 if (sc < 0) sc = 0;
165 if (m_draw_scaling != sc)
166 {
167 const int tmp=m_width;
168 m_draw_scaling = sc;
169 m_width=0;
170 resize(tmp,m_height);
171 }
172 }
173 return 1;
175 return m_draw_scaling;
177 return m_adv_scaling;
179 if (m_draw_scaling > 0)
180 {
181 if (m_adv_scaling > 0)
182 return (m_adv_scaling * m_draw_scaling) >> 8;
183 return m_draw_scaling;
184 }
185 return m_adv_scaling;
186 }
187 return 0;
188 }
189
190 // sysbitmap specific calls
191 virtual HDC getDC() { return m_dc; }
192
193
194private:
195 bool __resize(int w, int h);
197
201#ifdef _WIN32
202 HBITMAP m_bitmap;
203 HGDIOBJ m_oldbitmap;
204#endif
206};
207
209{
210 public:
211 LICE_WrapperBitmap(LICE_pixel *buf, int w, int h, int span, bool flipped)
212 {
213 m_buf=buf;
214 m_w=w;
215 m_h=h;
216 m_span=span;
217 m_flipped=flipped;
218 }
220
221 virtual bool resize(int w, int h) { return false; }
222 virtual LICE_pixel *getBits() { return m_buf; }
223 virtual int getWidth() { return m_w; }
224 virtual int getHeight() { return m_h; }
225 virtual int getRowSpan() { return m_span; }
226
227 virtual HDC getDC() { return NULL; }
228 virtual bool isFlipped() { return m_flipped; }
229
230
234};
235
236
237class LICE_SubBitmap : public LICE_IBitmap // note: you should only keep these around as long as they are needed, and don't resize the parent while this is allocated
238{
239 public:
240 LICE_SubBitmap(LICE_IBitmap *parent, int x, int y, int w, int h)
241 {
243 if(x<0)x=0;
244 if(y<0)y=0;
245 m_x=x;m_y=y;
246 __resize(w,h);
247 }
248 virtual ~LICE_SubBitmap() { }
249
250 virtual bool resize(int w, int h) { return __resize(w,h); }
251
252 bool __resize(int w, int h)
253 {
254 m_w=0;m_h=0;
256 {
257 if (w > m_parent->getWidth()-m_x) w=m_parent->getWidth()-m_x;
258 if (h > m_parent->getHeight()-m_y) h=m_parent->getHeight()-m_y;
259
260 m_w=w;
261 m_h=h;
262 }
263
264 return true;
265 }
266
267 virtual bool isFlipped() { return m_parent && m_parent->isFlipped(); }
268
269 virtual LICE_pixel *getBits()
270 {
271 if (!m_parent) return 0;
272
273 int xc = m_x, yc = m_y, h = m_h;
274 const int scale = (int)m_parent->Extended(LICE_EXT_GET_SCALING,NULL);
275 if (scale > 0)
276 {
277 xc = (xc*scale)>>8;
278 yc = (yc*scale)>>8;
279 h = (h*scale)>>8;
280 }
281
282 LICE_pixel* parentptr=m_parent->getBits();
283 if (m_parent->isFlipped()) parentptr += (m_parent->getHeight() - (yc+h))*m_parent->getRowSpan()+xc;
284 else parentptr += yc*m_parent->getRowSpan()+xc;
285
286 return parentptr;
287 }
288
289 enum {
291 LICE_SUBBITMAP_VERSION = 0x1000 // if we change any of this struct, then we *must* increment this version.
292 };
293
294 virtual INT_PTR Extended(int id, void* data)
295 {
297
298 if (!m_parent) return 0;
299 return m_parent->Extended(id, data);
300 }
301
302 virtual int getWidth() { return m_w; }
303 virtual int getHeight() { return m_h; }
304 virtual int getRowSpan() { return m_parent ? m_parent->getRowSpan() : 0; }
305
306 virtual HDC getDC() { return NULL; }
307
310};
311
312
313// flags that most blit functions can take
314
315#define LICE_BLIT_MODE_MASK 0xff
316#define LICE_BLIT_MODE_COPY 0
317#define LICE_BLIT_MODE_ADD 1
318#define LICE_BLIT_MODE_DODGE 2
319#define LICE_BLIT_MODE_MUL 3
320#define LICE_BLIT_MODE_OVERLAY 4
321#define LICE_BLIT_MODE_HSVADJ 5
322
323#define LICE_BLIT_MODE_CHANCOPY 0xf0 // in this mode, only available for LICE_Blit(), the low nibble is 2 bits of source channel (low 2), 2 bits of dest channel (high 2)
324
325#define LICE_BLIT_FILTER_MASK 0xff00
326#define LICE_BLIT_FILTER_NONE 0
327#define LICE_BLIT_FILTER_BILINEAR 0x100 // currently pretty slow! ack
328#define LICE_BLIT_IGNORE_SCALING 0x20000
329
330
331#define LICE_BLIT_USE_ALPHA 0x10000 // use source's alpha channel
332
333#ifndef lice_max
334#define lice_max(x,y) ((x)<(y)?(y):(x))
335#define lice_min(x,y) ((x)<(y)?(x):(y))
336#endif
337
338#ifdef _MSC_VER
339 #include <float.h>
340 #define lice_isfinite(x) _finite(x)
341#else
342 #define lice_isfinite(x) isfinite(x)
343#endif
344
345// Reaper exports most LICE functions, so the function declarations below
346// will collide with reaper_plugin.h
347#ifndef LICE_PROVIDED_BY_APP
348
349
350// bitmap loaders
351
352// dispatch to a linked loader implementation based on file extension
353LICE_IBitmap* LICE_LoadImage(const char* filename, LICE_IBitmap* bmp=NULL, bool tryIgnoreExtension=false);
354char *LICE_GetImageExtensionList(bool wantAllSup=true, bool wantAllFiles=true); // returns doublenull terminated GetOpenFileName() style list -- free() when done.
355bool LICE_ImageIsSupported(const char *filename); // must be a filename that ends in .jpg, etc. if you want to check the extension, pass .ext
356
357
358// pass a bmp if you wish to load it into that bitmap. note that if it fails bmp will not be deleted.
359LICE_IBitmap *LICE_LoadPNG(const char *filename, LICE_IBitmap *bmp=NULL); // returns a bitmap (bmp if nonzero) on success
360LICE_IBitmap *LICE_LoadPNGFromMemory(const void *data_in, int buflen, LICE_IBitmap *bmp=NULL);
361LICE_IBitmap *LICE_LoadPNGFromResource(HINSTANCE hInst, const char *resid, LICE_IBitmap *bmp=NULL); // returns a bitmap (bmp if nonzero) on success
362#ifndef _WIN32
363LICE_IBitmap *LICE_LoadPNGFromNamedResource(const char *name, LICE_IBitmap *bmp=NULL); // returns a bitmap (bmp if nonzero) on success
364#endif
365
366LICE_IBitmap *LICE_LoadBMP(const char *filename, LICE_IBitmap *bmp=NULL); // returns a bitmap (bmp if nonzero) on success
367LICE_IBitmap *LICE_LoadBMPFromResource(HINSTANCE hInst, const char *resid, LICE_IBitmap *bmp=NULL); // returns a bitmap (bmp if nonzero) on success
368
369LICE_IBitmap *LICE_LoadIcon(const char *filename, int reqiconsz=16, LICE_IBitmap *bmp=NULL); // returns a bitmap (bmp if nonzero) on success
370LICE_IBitmap *LICE_LoadIconFromResource(HINSTANCE hInst, const char *resid, int reqiconsz=16, LICE_IBitmap *bmp=NULL); // returns a bitmap (bmp if nonzero) on success
371
373LICE_IBitmap *LICE_LoadJPGFromMemory(const void *data_in, int buflen, LICE_IBitmap *bmp = NULL);
374LICE_IBitmap* LICE_LoadJPGFromResource(HINSTANCE hInst, const char *resid, LICE_IBitmap* bmp = 0);
375
376LICE_IBitmap *LICE_LoadGIF(const char *filename, LICE_IBitmap *bmp=NULL, int *nframes=NULL); // if nframes set, will be set to number of images (stacked vertically), otherwise first frame used
377
378LICE_IBitmap *LICE_LoadPCX(const char *filename, LICE_IBitmap *bmp=NULL); // returns a bitmap (bmp if nonzero) on success
379
380// bitmap saving
381bool LICE_WritePNG(const char *filename, LICE_IBitmap *bmp, bool wantalpha=true);
382bool LICE_WriteJPG(const char *filename, LICE_IBitmap *bmp, int quality=95, bool force_baseline=true);
383bool LICE_WriteGIF(const char *filename, LICE_IBitmap *bmp, int transparent_alpha=0, bool dither=true); // if alpha<transparent_alpha then transparent. if transparent_alpha<0, then intra-frame checking is used
384
385// animated GIF API. use transparent_alpha=-1 to encode unchanged pixels as transparent
386void *LICE_WriteGIFBegin(const char *filename, LICE_IBitmap *firstframe, int transparent_alpha=0, int frame_delay=0, bool dither=true, int nreps=0); // nreps=0 for infinite
387void *LICE_WriteGIFBeginNoFrame(const char *filename, int w, int h, int transparent_alpha=0, bool dither=true, bool is_append=false);
388bool LICE_WriteGIFFrame(void *handle, LICE_IBitmap *frame, int xpos, int ypos, bool perImageColorMap=false, int frame_delay=0, int nreps=0); // nreps only used on the first frame, 0=infinite
389unsigned int LICE_WriteGIFGetSize(void *handle); // gets current output size
390bool LICE_WriteGIFEnd(void *handle);
391int LICE_SetGIFColorMapFromOctree(void *wr, void *octree, int numcolors); // can use after LICE_WriteGIFBeginNoFrame and before LICE_WriteGIFFrame
392
393// animated GIF reading
394void *LICE_GIF_LoadEx(const char *filename);
395void LICE_GIF_Close(void *handle);
396void LICE_GIF_Rewind(void *handle);
397unsigned int LICE_GIF_GetFilePos(void *handle); // gets current read position
398int LICE_GIF_UpdateFrame(void *handle, LICE_IBitmap *bm); // returns duration in msec (0 or more), or <0 if no more frames. bm will be modified/resized with new frame data
399
400
401
402// basic primitives
403void LICE_PutPixel(LICE_IBitmap *bm, int x, int y, LICE_pixel color, float alpha, int mode);
405
406// blit functions
407
408void LICE_Copy(LICE_IBitmap *dest, LICE_IBitmap *src); // resizes dest to fit
409
410
411//alpha parameter = const alpha (combined with source alpha if spcified)
412void LICE_Blit(LICE_IBitmap *dest, LICE_IBitmap *src, int dstx, int dsty, const RECT *srcrect, float alpha, int mode);
413void LICE_Blit(LICE_IBitmap *dest, LICE_IBitmap *src, int dstx, int dsty, int srcx, int srcy, int srcw, int srch, float alpha, int mode);
414
415void LICE_Blur(LICE_IBitmap *dest, LICE_IBitmap *src, int dstx, int dsty, int srcx, int srcy, int srcw, int srch);
416
417// dstw/dsty can be negative, srcw/srch can be as well (for flipping)
418void LICE_ScaledBlit(LICE_IBitmap *dest, LICE_IBitmap *src, int dstx, int dsty, int dstw, int dsth,
419 float srcx, float srcy, float srcw, float srch, float alpha, int mode);
420
421
422void LICE_HalveBlitAA(LICE_IBitmap *dest, LICE_IBitmap *src); // AA's src down to dest. uses the minimum size of both (use with LICE_SubBitmap to do sections)
423
424// if cliptosourcerect is false, then areas outside the source rect can get in (otherwise they are not drawn)
426 int dstx, int dsty, int dstw, int dsth,
427 float srcx, float srcy, float srcw, float srch,
428 float angle,
429 bool cliptosourcerect, float alpha, int mode,
430 float rotxcent=0.0, float rotycent=0.0); // these coordinates are offset from the center of the image, in source pixel coordinates
431
432
434 int dstx, int dsty, int dstw, int dsth,
435 const float *srcpoints, int div_w, int div_h, // srcpoints coords should be div_w*div_h*2 long, and be in source image coordinates
436 float alpha, int mode);
438 int dstx, int dsty, int dstw, int dsth,
439 const double *srcpoints, int div_w, int div_h, // srcpoints coords should be div_w*div_h*2 long, and be in source image coordinates
440 float alpha, int mode);
441
443 int dstx, int dsty, int dstw, int dsth,
444 const double *srcpoints, int div_w, int div_h, // srcpoints coords should be div_w*div_h*3 long, and be in source image coordinates + alpha
445 int mode);
446
447// if cliptosourcerect is false, then areas outside the source rect can get in (otherwise they are not drawn)
449 int dstx, int dsty, int dstw, int dsth,
450 float srcx, float srcy, float srcw, float srch,
451 double dsdx, double dtdx, double dsdy, double dtdy,
452 double dsdxdy, double dtdxdy,
453 bool cliptosourcerect, float alpha, int mode);
454
456 int dstx, int dsty, int dstw, int dsth,
457 float srcx, float srcy, float srcw, float srch,
458 double dsdx, double dtdx, double dsdy, double dtdy,
459 double dsdxdy, double dtdxdy,
460 bool cliptosourcerect, float alpha, int mode, double dadx, double dady, double dadxdy);
461
462
463// only LICE_BLIT_MODE_ADD or LICE_BLIT_MODE_COPY are used by this, for flags
464// ir-ia should be 0.0..1.0 (or outside that and they'll be clamped)
465// drdx should be X/dstw, drdy X/dsth etc
466void LICE_GradRect(LICE_IBitmap *dest, int dstx, int dsty, int dstw, int dsth,
467 float ir, float ig, float ib, float ia,
468 float drdx, float dgdx, float dbdx, float dadx,
469 float drdy, float dgdy, float dbdy, float dady,
470 int mode);
471
472void LICE_FillRect(LICE_IBitmap *dest, int x, int y, int w, int h, LICE_pixel color, float alpha = 1.0f, int mode = 0);
473void LICE_ProcessRect(LICE_IBitmap *dest, int x, int y, int w, int h, void (*procFunc)(LICE_pixel *p, void *parm), void *parm);
474
475void LICE_Clear(LICE_IBitmap *dest, LICE_pixel color);
476void LICE_ClearRect(LICE_IBitmap *dest, int x, int y, int w, int h, LICE_pixel mask=0, LICE_pixel orbits=0);
477void LICE_MultiplyAddRect(LICE_IBitmap *dest, int x, int y, int w, int h,
478 float rsc, float gsc, float bsc, float asc, // 0-1, or -100 .. +100 if you really are insane
479 float radd, float gadd, float badd, float aadd); // 0-255 is the normal range on these.. of course its clamped
480
482
483
484// non-flood fill. simply scans up/down and left/right
485void LICE_SimpleFill(LICE_IBitmap *dest, int x, int y, LICE_pixel newcolor,
486 LICE_pixel comparemask=LICE_RGBA(255,255,255,0),
487 LICE_pixel keepmask=LICE_RGBA(0,0,0,0));
488
489
490// texture generators
491void LICE_TexGen_Marble(LICE_IBitmap *dest, const RECT *rect, float rv, float gv, float bv, float intensity); //fills whole bitmap if rect == NULL
492
493//this function generates a Perlin noise
494//fills whole bitmap if rect == NULL
495//smooth needs to be a multiple of 2
496enum
497{
500};
501void LICE_TexGen_Noise(LICE_IBitmap *dest, const RECT *rect, float rv, float gv, float bv, float intensity, int mode=NOISE_MODE_NORMAL, int smooth=1);
502
503//this function generates a Perlin noise in a circular fashion
504//fills whole bitmap if rect == NULL
505//size needs to be a multiple of 2
506void LICE_TexGen_CircNoise(LICE_IBitmap *dest, const RECT *rect, float rv, float gv, float bv, float nrings, float power, int size);
507
508
509// bitmapped text drawing:
510void LICE_DrawChar(LICE_IBitmap *bm, int x, int y, char c,
511 LICE_pixel color, float alpha, int mode);
512void LICE_DrawText(LICE_IBitmap *bm, int x, int y, const char *string,
513 LICE_pixel color, float alpha, int mode);
514void LICE_MeasureText(const char *string, int *w, int *h);
515
516// line drawing functions
517
518void LICE_Line(LICE_IBitmap *dest, int x1, int y1, int x2, int y2, LICE_pixel color, float alpha=1.0f, int mode=0, bool aa=true);
519void LICE_FLine(LICE_IBitmap* dest, float x1, float y1, float x2, float y2, LICE_pixel color, float alpha=1.0f, int mode=0, bool aa=true);
520void LICE_ThickFLine(LICE_IBitmap* dest, double x1, double y1, double x2, double y2, LICE_pixel color, float alpha, int mode, int wid); // always AA. wid is not affected by scaling (1 is always normal line, 2 is always 2 physical pixels, etc)
521
522void LICE_DashedLine(LICE_IBitmap* dest, int x1, int y1, int x2, int y2, int pxon, int pxoff, LICE_pixel color, float alpha=1.0f, int mode=0, bool aa=false); // straight lines only for now
523
524void LICE_FillTrapezoidF(LICE_IBitmap* dest, double fx1a, double fx1b, int y1, double fx2a, double fx2b, int y2, LICE_pixel color, float alpha, int mode);
525void LICE_FillTrapezoid(LICE_IBitmap* dest, int x1a, int x1b, int y1, int x2a, int x2b, int y2, LICE_pixel color, float alpha, int mode);
526void LICE_FillConvexPolygon(LICE_IBitmap* dest, const int* x, const int* y, int npoints, LICE_pixel color, float alpha, int mode);
527
528void LICE_FillTriangle(LICE_IBitmap *dest, int x1, int y1, int x2, int y2, int x3, int y3, LICE_pixel color, float alpha=1.0f, int mode=0);
529
530
531// Returns false if the line is entirely offscreen.
532bool LICE_ClipLine(int* pX1, int* pY1, int* pX2, int* pY2, int xLo, int yLo, int xHi, int yHi);
533bool LICE_ClipFLine(float* px1, float* py1, float* px2, float* py2, float xlo, float ylo, float xhi, float yhi);
534
535void LICE_Arc(LICE_IBitmap* dest, float cx, float cy, float r, float minAngle, float maxAngle,
536 LICE_pixel color, float alpha=1.0f, int mode=0, bool aa=true);
537void LICE_Circle(LICE_IBitmap* dest, float cx, float cy, float r, LICE_pixel color, float alpha=1.0f, int mode=0, bool aa=true);
538void LICE_FillCircle(LICE_IBitmap* dest, float cx, float cy, float r, LICE_pixel color, float alpha=1.0f, int mode=0, bool aa=true);
539void LICE_RoundRect(LICE_IBitmap *drawbm, float xpos, float ypos, float w, float h, int cornerradius,
540 LICE_pixel col, float alpha, int mode, bool aa);
541
542// useful for drawing shapes from a cache
543void LICE_DrawGlyph(LICE_IBitmap* dest, int x, int y, LICE_pixel color, const LICE_pixel_chan* alphas, int glyph_w, int glyph_h, float alpha=1.0f, int mode = 0);
544void LICE_DrawGlyphEx(LICE_IBitmap* dest, int x, int y, LICE_pixel color, const LICE_pixel_chan* alphas, int glyph_w, int glyph_span, int glyph_h, float alpha=1.0f, int mode = 0);
545
546void LICE_DrawMonoGlyph(LICE_IBitmap* dest, int x, int y, LICE_pixel color, const unsigned char* alphas, int glyph_w, int glyph_span, int glyph_h, float alpha=1.0f, int mode = 0);
547
548// quadratic bezier
549// tol means try to draw segments no longer than tol px
550void LICE_DrawQBezier(LICE_IBitmap* dest, double xstart, double ystart, double xctl, double yctl, double xend, double yend,
551 LICE_pixel color, float alpha=1.0f, int mode=0, bool aa=true, double tol=0.0);
552
553// cubic bezier
554// tol means try to draw segments no longer than tol px
555void LICE_DrawCBezier(LICE_IBitmap* dest, double xstart, double ystart, double xctl1, double yctl1,
556 double xctl2, double yctl2, double xend, double yend, LICE_pixel color, float alpha=1.0f, int mode=0, bool aa=true, double tol=0.0);
557
558void LICE_DrawThickCBezier(LICE_IBitmap* dest, double xstart, double ystart, double xctl1, double yctl1,
559 double xctl2, double yctl2, double xend, double yend, LICE_pixel color, float alpha=1.0f, int mode=0, int wid=2, double tol=0.0);
560
561// vertical fill from y=yfill
562void LICE_FillCBezier(LICE_IBitmap* dest, double xstart, double ystart, double xctl1, double yctl1,
563 double xctl2, double yctl2, double xend, double yend, int yfill, LICE_pixel color, float alpha=1.0f, int mode=0, double tol=0.0);
564// horizontal fill from x=xfill
565void LICE_FillCBezierX(LICE_IBitmap* dest, double xstart, double ystart, double xctl1, double yctl1,
566 double xctl2, double yctl2, double xend, double yend, int xfill, LICE_pixel color, float alpha=1.0f, int mode=0, double tol=0.0);
567
568// convenience functions
569void LICE_DrawRect(LICE_IBitmap *dest, int x, int y, int w, int h, LICE_pixel color, float alpha=1.0f, int mode=0);
570void LICE_BorderedRect(LICE_IBitmap *dest, int x, int y, int w, int h, LICE_pixel bgcolor, LICE_pixel fgcolor, float alpha=1.0f, int mode=0);
571
572// bitmap compare-by-value function
573int LICE_BitmapCmp(LICE_IBitmap* a, LICE_IBitmap* b, int *coordsOut=NULL);
575
576// colorspace functions
577void LICE_RGB2HSV(int r, int g, int b, int* h, int* s, int* v); // rgb, sv: [0,256), h: [0,384)
578void LICE_HSV2RGB(int h, int s, int v, int* r, int* g, int* b); // rgb, sv: [0,256), h: [0,384)
579LICE_pixel LICE_HSV2Pix(int h, int s, int v, int alpha); // sv: [0,256), h: [0,384)
580
581LICE_pixel LICE_AlterColorHSV(LICE_pixel color, float d_hue, float d_saturation, float d_value); // hue is rolled over, saturation and value are clamped, all 0..1
582void LICE_AlterBitmapHSV(LICE_IBitmap* src, float d_hue, float d_saturation, float d_value); // hue is rolled over, saturation and value are clamped, all 0..1
583void LICE_AlterRectHSV(LICE_IBitmap* src, int x, int y, int w, int h, float d_hue, float d_saturation, float d_value, int mode=0); // hue is rolled over, saturation and value are clamped, all 0..1. mode only used for scaling disable
584
585LICE_pixel LICE_CombinePixels(LICE_pixel dest, LICE_pixel src, float alpha, int mode);
586
587void LICE_CombinePixels2(LICE_pixel *destptr, int r, int g, int b, int a, int ia, int mode); // does not clamp
588void LICE_CombinePixels2Clamp(LICE_pixel *destptr, int r, int g, int b, int a, int ia, int mode);
589
591
592class ProjectStateContext;
593void *LICE_LoadLVG(const char *filename);
594void *LICE_LoadLVGFromContext(ProjectStateContext *ctx, const char *nameInfo=NULL, int defw=0, int defh=0);
595void *LICE_GetSubLVG(void *lvg, const char *subname);
596LICE_IBitmap *LICE_RenderLVG(void *lvg, int reqw=0, int reqh=0, LICE_IBitmap *useBM=NULL);
597void LICE_DestroyLVG(void *lvg);
598
600
601void* LICE_CreateOctree(int maxcolors);
602void LICE_DestroyOctree(void* octree);
603void LICE_ResetOctree(void *octree, int maxcolors); // resets back to stock, but with spares (to avoid mallocs)
604int LICE_BuildOctree(void* octree, LICE_IBitmap* bmp);
605int LICE_BuildOctreeForAlpha(void* octree, LICE_IBitmap* bmp, unsigned int minalpha);
606int LICE_BuildOctreeForDiff(void* octree, LICE_IBitmap* bmp, LICE_IBitmap* refbmp, LICE_pixel mask=LICE_RGBA(255,255,255,0));
607int LICE_FindInOctree(void* octree, LICE_pixel color);
608int LICE_ExtractOctreePalette(void* octree, LICE_pixel* palette);
609
610// wrapper
611int LICE_BuildPalette(LICE_IBitmap* bmp, LICE_pixel* palette, int maxcolors);
612void LICE_TestPalette(LICE_IBitmap* bmp, LICE_pixel* palette, int numcolors);
613
614
616{
617 LICE_IBitmap *(*loadfunc)(const char *filename, bool checkFileName, LICE_IBitmap *bmpbase);
618 const char *(*get_extlist)(); // returns GetOpenFileName sort of list "JPEG files (*.jpg)\0*.jpg\0"
619
621};
623
624
625#endif // LICE_PROVIDED_BY_APP
626
627#ifdef __APPLE__
628#define LICE_Scale_BitBlt(hdc, x,y,w,h, src, sx,sy, mode) do { \
629 const int _x=(x), _y=(y), _w=(w), _h=(h), _sx = (sx), _sy = (sy), _mode=(mode); \
630 const int rsc = (int) (src)->Extended(LICE_EXT_GET_SCALING,NULL); \
631 if (rsc>0) \
632 StretchBlt(hdc,_x,_y,_w,_h,(src)->getDC(),(_sx*rsc)/256,(_sy*rsc)/256,(_w*rsc)>>8,(_h*rsc)>>8,_mode); \
633 else BitBlt(hdc,_x,_y,_w,_h,(src)->getDC(),_sx,_sy,_mode); \
634} while (0)
635#else
636#define LICE_Scale_BitBlt(hdc, x,y,w,h, src, sx,sy, mode) BitBlt(hdc,x,y,w,h,(src)->getDC(),sx,sy,mode)
637#endif
638
639#endif
#define NULL
Definition CarlaBridgeFormat.cpp:30
uint8_t a
Definition Spc_Cpu.h:141
static const unsigned long mask[]
Definition bitwise.c:31
Definition lice.h:84
virtual int getHeight()=0
virtual int getRowSpan()=0
virtual int getWidth()=0
virtual bool isFlipped()
Definition lice.h:92
virtual ~LICE_IBitmap()
Definition lice.h:86
virtual INT_PTR Extended(int id, void *data)
Definition lice.h:98
virtual bool resize(int w, int h)=0
virtual LICE_pixel * getBits()=0
virtual HDC getDC()
Definition lice.h:95
int m_width
Definition lice.h:132
virtual ~LICE_MemBitmap()
Definition lice.cpp:86
virtual int getWidth()
Definition lice.h:122
virtual bool resize(int w, int h)
Definition lice.h:125
LICE_pixel * m_fb
Definition lice.h:131
bool __resize(int w, int h)
Definition lice.cpp:88
virtual int getRowSpan()
Definition lice.h:124
unsigned int m_linealign
Definition lice.h:134
virtual int getHeight()
Definition lice.h:123
int m_height
Definition lice.h:132
LICE_MemBitmap(int w=0, int h=0, unsigned int linealign=4)
Definition lice.cpp:75
virtual LICE_pixel * getBits()
Definition lice.h:117
int m_allocsize
Definition lice.h:133
virtual LICE_pixel * getBits()
Definition lice.h:269
virtual int getWidth()
Definition lice.h:302
@ LICE_GET_SUBBITMAP_VERSION
Definition lice.h:290
@ LICE_SUBBITMAP_VERSION
Definition lice.h:291
virtual int getHeight()
Definition lice.h:303
virtual ~LICE_SubBitmap()
Definition lice.h:248
int m_x
Definition lice.h:308
LICE_SubBitmap(LICE_IBitmap *parent, int x, int y, int w, int h)
Definition lice.h:240
virtual bool resize(int w, int h)
Definition lice.h:250
LICE_IBitmap * m_parent
Definition lice.h:309
virtual HDC getDC()
Definition lice.h:306
virtual bool isFlipped()
Definition lice.h:267
int m_h
Definition lice.h:308
virtual int getRowSpan()
Definition lice.h:304
int m_y
Definition lice.h:308
virtual INT_PTR Extended(int id, void *data)
Definition lice.h:294
bool __resize(int w, int h)
Definition lice.h:252
int m_w
Definition lice.h:308
virtual HDC getDC()
Definition lice.h:191
virtual LICE_pixel * getBits()
Definition lice.h:144
virtual int getRowSpan()
Definition lice.h:147
HDC m_dc
Definition lice.h:198
LICE_SysBitmap(int w=0, int h=0)
Definition lice.cpp:126
virtual int getHeight()
Definition lice.h:146
virtual int getWidth()
Definition lice.h:145
int m_allocw
Definition lice.h:200
virtual bool resize(int w, int h)
Definition lice.h:148
int m_width
Definition lice.h:196
int m_alloch
Definition lice.h:200
int m_height
Definition lice.h:196
LICE_pixel * m_bits
Definition lice.h:199
virtual ~LICE_SysBitmap()
Definition lice.cpp:145
int m_adv_scaling
Definition lice.h:205
int m_draw_scaling
Definition lice.h:205
bool __resize(int w, int h)
Definition lice.cpp:157
virtual INT_PTR Extended(int id, void *data)
Definition lice.h:150
virtual bool isFlipped()
Definition lice.h:228
int m_w
Definition lice.h:232
LICE_WrapperBitmap(LICE_pixel *buf, int w, int h, int span, bool flipped)
Definition lice.h:211
virtual int getWidth()
Definition lice.h:223
int m_h
Definition lice.h:232
virtual int getHeight()
Definition lice.h:224
virtual int getRowSpan()
Definition lice.h:225
bool m_flipped
Definition lice.h:233
virtual LICE_pixel * getBits()
Definition lice.h:222
virtual HDC getDC()
Definition lice.h:227
LICE_pixel * m_buf
Definition lice.h:231
virtual bool resize(int w, int h)
Definition lice.h:221
virtual ~LICE_WrapperBitmap()
Definition lice.h:219
int m_span
Definition lice.h:232
UINT_D64 w
Definition inflate.c:942
int y
Definition inflate.c:1588
unsigned v[N_MAX]
Definition inflate.c:1584
int g
Definition inflate.c:1573
unsigned s
Definition inflate.c:1555
unsigned x[BMAX+1]
Definition inflate.c:1586
static char filename[]
Definition features.c:5
static const char * name
Definition pugl.h:1582
static uintptr_t parent
Definition pugl.h:1644
JSAMPIMAGE data
Definition jpeglib.h:945
int quality
Definition jpeglib.h:919
int boolean force_baseline
Definition jpeglib.h:920
_LICE_ImageLoader_rec * LICE_ImageLoader_list
Definition lice.cpp:43
LICE_IBitmap * LICE_LoadImage(const char *filename, LICE_IBitmap *bmp=NULL, bool tryIgnoreExtension=false)
Definition lice_image.cpp:5
void * LICE_LoadLVG(const char *filename)
LICE_IBitmap * LICE_LoadPCX(const char *filename, LICE_IBitmap *bmp=NULL)
bool LICE_WriteGIFEnd(void *handle)
void LICE_TransformBlit2Alpha(LICE_IBitmap *dest, LICE_IBitmap *src, int dstx, int dsty, int dstw, int dsth, const double *srcpoints, int div_w, int div_h, int mode)
Definition lice.cpp:2473
void * LICE_GetSubLVG(void *lvg, const char *subname)
LICE_IBitmap * LICE_LoadGIF(const char *filename, LICE_IBitmap *bmp=NULL, int *nframes=NULL)
Definition lice_stb_gif.cpp:21
LICE_IBitmap * LICE_LoadPNGFromResource(HINSTANCE hInst, const char *resid, LICE_IBitmap *bmp=NULL)
void * LICE_WriteGIFBegin(const char *filename, LICE_IBitmap *firstframe, int transparent_alpha=0, int frame_delay=0, bool dither=true, int nreps=0)
int LICE_BuildOctreeForDiff(void *octree, LICE_IBitmap *bmp, LICE_IBitmap *refbmp, LICE_pixel mask=LICE_RGBA(255, 255, 255, 0))
Definition lice_palette.cpp:165
LICE_IBitmap * LICE_LoadJPGFromMemory(const void *data_in, int buflen, LICE_IBitmap *bmp=NULL)
void LICE_FillTrapezoidF(LICE_IBitmap *dest, double fx1a, double fx1b, int y1, double fx2a, double fx2b, int y2, LICE_pixel color, float alpha, int mode)
Definition lice_line.cpp:1607
int LICE_SetGIFColorMapFromOctree(void *wr, void *octree, int numcolors)
LICE_IBitmap * LICE_LoadPNG(const char *filename, LICE_IBitmap *bmp=NULL)
Definition lice_stb_png.cpp:21
LICE_pixel LICE_CombinePixels(LICE_pixel dest, LICE_pixel src, float alpha, int mode)
Definition lice.cpp:45
#define LICE_MEMBITMAP_ALIGNAMT
Definition lice.h:107
void LICE_SetAlphaFromColorMask(LICE_IBitmap *dest, LICE_pixel color)
Definition lice.cpp:2484
int LICE_BuildPalette(LICE_IBitmap *bmp, LICE_pixel *palette, int maxcolors)
Definition lice_palette.cpp:31
int LICE_GIF_UpdateFrame(void *handle, LICE_IBitmap *bm)
void LICE_HSV2RGB(int h, int s, int v, int *r, int *g, int *b)
void LICE_DrawGlyphEx(LICE_IBitmap *dest, int x, int y, LICE_pixel color, const LICE_pixel_chan *alphas, int glyph_w, int glyph_span, int glyph_h, float alpha=1.0f, int mode=0)
Definition lice.cpp:2680
void LICE_TransformBlit(LICE_IBitmap *dest, LICE_IBitmap *src, int dstx, int dsty, int dstw, int dsth, const float *srcpoints, int div_w, int div_h, float alpha, int mode)
Definition lice.cpp:2457
#define LICE_RGBA(r, g, b, a)
Definition lice.h:57
unsigned int LICE_GIF_GetFilePos(void *handle)
void LICE_DrawMonoGlyph(LICE_IBitmap *dest, int x, int y, LICE_pixel color, const unsigned char *alphas, int glyph_w, int glyph_span, int glyph_h, float alpha=1.0f, int mode=0)
Definition lice.cpp:2767
void LICE_ThickFLine(LICE_IBitmap *dest, double x1, double y1, double x2, double y2, LICE_pixel color, float alpha, int mode, int wid)
Definition lice_line.cpp:1911
unsigned int LICE_WriteGIFGetSize(void *handle)
void * LICE_GIF_LoadEx(const char *filename)
bool LICE_WriteJPG(const char *filename, LICE_IBitmap *bmp, int quality=95, bool force_baseline=true)
Definition lice_stb_write.cpp:90
int LICE_BuildOctreeForAlpha(void *octree, LICE_IBitmap *bmp, unsigned int minalpha)
Definition lice_palette.cpp:132
LICE_IBitmap * LICE_LoadJPG(const char *filename, LICE_IBitmap *bmp=NULL)
Definition lice_stb_jpg.cpp:21
void LICE_TexGen_Noise(LICE_IBitmap *dest, const RECT *rect, float rv, float gv, float bv, float intensity, int mode=NOISE_MODE_NORMAL, int smooth=1)
Definition lice_texgen.cpp:220
LICE_IBitmap * LICE_LoadIcon(const char *filename, int reqiconsz=16, LICE_IBitmap *bmp=NULL)
void LICE_AlterRectHSV(LICE_IBitmap *src, int x, int y, int w, int h, float d_hue, float d_saturation, float d_value, int mode=0)
Definition lice_colorspace.cpp:51
#define LICE_EXT_GET_ANY_SCALING
Definition lice.h:105
LICE_IBitmap * LICE_LoadJPGFromResource(HINSTANCE hInst, const char *resid, LICE_IBitmap *bmp=0)
bool LICE_WritePNG(const char *filename, LICE_IBitmap *bmp, bool wantalpha=true)
Definition lice_stb_write.cpp:79
LICE_pixel LICE_HSV2Pix(int h, int s, int v, int alpha)
LICE_pixel LICE_GetPixel(LICE_IBitmap *bm, int x, int y)
Definition lice.cpp:2220
void LICE_ProcessRect(LICE_IBitmap *dest, int x, int y, int w, int h, void(*procFunc)(LICE_pixel *p, void *parm), void *parm)
Definition lice.cpp:2060
static LICE_pixel LICE_RGBA_FROMNATIVE(LICE_pixel col, int alpha=0)
Definition lice.h:76
bool LICE_WriteGIFFrame(void *handle, LICE_IBitmap *frame, int xpos, int ypos, bool perImageColorMap=false, int frame_delay=0, int nreps=0)
char * LICE_GetImageExtensionList(bool wantAllSup=true, bool wantAllFiles=true)
Definition lice_image.cpp:42
void LICE_ClearRect(LICE_IBitmap *dest, int x, int y, int w, int h, LICE_pixel mask=0, LICE_pixel orbits=0)
Definition lice.cpp:2183
void * LICE_LoadLVGFromContext(ProjectStateContext *ctx, const char *nameInfo=NULL, int defw=0, int defh=0)
void LICE_HalveBlitAA(LICE_IBitmap *dest, LICE_IBitmap *src)
Definition lice.cpp:2837
bool LICE_WriteGIF(const char *filename, LICE_IBitmap *bmp, int transparent_alpha=0, bool dither=true)
void LICE_SimpleFill(LICE_IBitmap *dest, int x, int y, LICE_pixel newcolor, LICE_pixel comparemask=LICE_RGBA(255, 255, 255, 0), LICE_pixel keepmask=LICE_RGBA(0, 0, 0, 0))
Definition lice.cpp:2507
int LICE_BitmapCmp(LICE_IBitmap *a, LICE_IBitmap *b, int *coordsOut=NULL)
Definition lice.cpp:2890
void LICE_ResetOctree(void *octree, int maxcolors)
Definition lice_palette.cpp:61
unsigned char LICE_pixel_chan
Definition lice.h:55
void LICE_MultiplyAddRect(LICE_IBitmap *dest, int x, int y, int w, int h, float rsc, float gsc, float bsc, float asc, float radd, float gadd, float badd, float aadd)
Definition lice.cpp:2006
LICE_IBitmap * LICE_LoadPNGFromNamedResource(const char *name, LICE_IBitmap *bmp=NULL)
void LICE_CombinePixels2(LICE_pixel *destptr, int r, int g, int b, int a, int ia, int mode)
Definition lice.cpp:61
void LICE_GIF_Rewind(void *handle)
LICE_IBitmap * LICE_LoadBMP(const char *filename, LICE_IBitmap *bmp=NULL)
Definition lice_stb_bmp.cpp:21
void LICE_Blur(LICE_IBitmap *dest, LICE_IBitmap *src, int dstx, int dsty, int srcx, int srcy, int srcw, int srch)
Definition lice.cpp:1103
LICE_IBitmap * LICE_LoadPNGFromMemory(const void *data_in, int buflen, LICE_IBitmap *bmp=NULL)
#define LICE_EXT_GET_ADVISORY_SCALING
Definition lice.h:104
int LICE_BuildOctree(void *octree, LICE_IBitmap *bmp)
Definition lice_palette.cpp:105
unsigned int LICE_pixel
Definition lice.h:54
void LICE_DrawCBezier(LICE_IBitmap *dest, double xstart, double ystart, double xctl1, double yctl1, double xctl2, double yctl2, double xend, double yend, LICE_pixel color, float alpha=1.0f, int mode=0, bool aa=true, double tol=0.0)
Definition lice_line.cpp:1220
void LICE_TestPalette(LICE_IBitmap *bmp, LICE_pixel *palette, int numcolors)
Definition lice_palette.cpp:241
@ NOISE_MODE_NORMAL
Definition lice.h:498
@ NOISE_MODE_WOOD
Definition lice.h:499
LICE_IBitmap * LICE_LoadIconFromResource(HINSTANCE hInst, const char *resid, int reqiconsz=16, LICE_IBitmap *bmp=NULL)
void LICE_RGB2HSV(int r, int g, int b, int *h, int *s, int *v)
void LICE_DrawChar(LICE_IBitmap *bm, int x, int y, char c, LICE_pixel color, float alpha, int mode)
Definition lice_text.cpp:1283
void LICE_FillCBezier(LICE_IBitmap *dest, double xstart, double ystart, double xctl1, double yctl1, double xctl2, double yctl2, double xend, double yend, int yfill, LICE_pixel color, float alpha=1.0f, int mode=0, double tol=0.0)
Definition lice_line.cpp:1332
void LICE_DrawQBezier(LICE_IBitmap *dest, double xstart, double ystart, double xctl, double yctl, double xend, double yend, LICE_pixel color, float alpha=1.0f, int mode=0, bool aa=true, double tol=0.0)
Definition lice_line.cpp:1076
LICE_IBitmap * LICE_LoadBMPFromResource(HINSTANCE hInst, const char *resid, LICE_IBitmap *bmp=NULL)
void LICE_FillCBezierX(LICE_IBitmap *dest, double xstart, double ystart, double xctl1, double yctl1, double xctl2, double yctl2, double xend, double yend, int xfill, LICE_pixel color, float alpha=1.0f, int mode=0, double tol=0.0)
Definition lice_line.cpp:1382
int LICE_ExtractOctreePalette(void *octree, LICE_pixel *palette)
Definition lice_palette.cpp:227
int LICE_FindInOctree(void *octree, LICE_pixel color)
Definition lice_palette.cpp:216
void LICE_DestroyLVG(void *lvg)
#define LICE_EXT_GET_SCALING
Definition lice.h:102
void LICE_GIF_Close(void *handle)
#define LICE_EXT_SET_SCALING
Definition lice.h:101
void LICE_DestroyOctree(void *octree)
Definition lice_palette.cpp:85
void LICE_DeltaBlitAlpha(LICE_IBitmap *dest, LICE_IBitmap *src, int dstx, int dsty, int dstw, int dsth, float srcx, float srcy, float srcw, float srch, double dsdx, double dtdx, double dsdy, double dtdy, double dsdxdy, double dtdxdy, bool cliptosourcerect, float alpha, int mode, double dadx, double dady, double dadxdy)
Definition lice.cpp:1640
#define LICE_EXT_SET_ADVISORY_SCALING
Definition lice.h:103
void LICE_AlterBitmapHSV(LICE_IBitmap *src, float d_hue, float d_saturation, float d_value)
Definition lice_colorspace.cpp:46
void LICE_CombinePixels2Clamp(LICE_pixel *destptr, int r, int g, int b, int a, int ia, int mode)
Definition lice.cpp:67
bool LICE_ClipFLine(float *px1, float *py1, float *px2, float *py2, float xlo, float ylo, float xhi, float yhi)
Definition lice_line.cpp:994
int LICE_BitmapCmpEx(LICE_IBitmap *a, LICE_IBitmap *b, LICE_pixel mask, int *coordsOut=NULL)
Definition lice.cpp:2895
void * LICE_CreateOctree(int maxcolors)
palette
Definition lice_palette.cpp:49
void * LICE_WriteGIFBeginNoFrame(const char *filename, int w, int h, int transparent_alpha=0, bool dither=true, bool is_append=false)
void LICE_TexGen_Marble(LICE_IBitmap *dest, const RECT *rect, float rv, float gv, float bv, float intensity)
Definition lice_texgen.cpp:15
bool LICE_ClipLine(int *pX1, int *pY1, int *pX2, int *pY2, int xLo, int yLo, int xHi, int yHi)
Definition lice_line.cpp:980
LICE_IBitmap * LICE_RenderLVG(void *lvg, int reqw=0, int reqh=0, LICE_IBitmap *useBM=NULL)
void LICE_TexGen_CircNoise(LICE_IBitmap *dest, const RECT *rect, float rv, float gv, float bv, float nrings, float power, int size)
Definition lice_texgen.cpp:296
void LICE_DeltaBlit(LICE_IBitmap *dest, LICE_IBitmap *src, int dstx, int dsty, int dstw, int dsth, float srcx, float srcy, float srcw, float srch, double dsdx, double dtdx, double dsdy, double dtdy, double dsdxdy, double dtdxdy, bool cliptosourcerect, float alpha, int mode)
Definition lice.cpp:1485
LICE_pixel LICE_AlterColorHSV(LICE_pixel color, float d_hue, float d_saturation, float d_value)
Definition lice_colorspace.cpp:38
bool LICE_ImageIsSupported(const char *filename)
Definition lice_image.cpp:116
void LICE_DrawThickCBezier(LICE_IBitmap *dest, double xstart, double ystart, double xctl1, double yctl1, double xctl2, double yctl2, double xend, double yend, LICE_pixel color, float alpha=1.0f, int mode=0, int wid=2, double tol=0.0)
Definition lice_line.cpp:1265
void LICE_TransformBlit2(LICE_IBitmap *dest, LICE_IBitmap *src, int dstx, int dsty, int dstw, int dsth, const double *srcpoints, int div_w, int div_h, float alpha, int mode)
Definition lice.cpp:2464
void LICE_RoundRect(LICE_IBitmap *drawbm, float xpos, float ypos, float w, float h, int cornerradius, LICE_pixel col, float alpha, int mode, bool aa)
Definition lice_arc.cpp:684
void LICE_GradRect(LICE_IBitmap *dest, int dstx, int dsty, int dstw, int dsth, float ir, float ig, float ib, float ia, float drdx, float dgdx, float dbdx, float dadx, float drdy, float dgdy, float dbdy, float dady, int mode)
Definition lice.cpp:835
#define LICE_FLine
Definition lice_import.h:36
#define LICE_FillTrapezoid
Definition lice_import.h:49
#define LICE_Blit
Definition lice_import.h:42
#define LICE_PutPixel
Definition lice_import.h:34
#define LICE_MeasureText
Definition lice_import.h:53
#define LICE_Arc
Definition lice_import.h:48
#define LICE_DrawText
Definition lice_import.h:52
#define LICE_DrawRect
Definition lice_import.h:39
#define LICE_Circle
Definition lice_import.h:40
#define LICE_FillRect
Definition lice_import.h:38
#define LICE_DashedLine
Definition lice_import.h:37
#define LICE_Copy
Definition lice_import.h:51
#define LICE_BorderedRect
Definition lice_import.h:46
#define LICE_Clear
Definition lice_import.h:41
#define LICE_FillTriangle
Definition lice_import.h:47
#define LICE_FillConvexPolygon
Definition lice_import.h:50
#define LICE_DrawGlyph
Definition lice_import.h:44
#define LICE_Line
Definition lice_import.h:35
#define LICE_ScaledBlit
Definition lice_import.h:54
#define LICE_RotatedBlit
Definition lice_import.h:43
#define LICE_FillCircle
Definition lice_import.h:45
png_structrp int mode
Definition png.h:1139
Definition lice.h:616
struct _LICE_ImageLoader_rec * _next
Definition lice.h:620
Definition swell-types.h:231
#define GetRValue(x)
#define GetGValue(x)
#define GetBValue(x)
void DWORD DWORD LPVOID parm
Definition swell-functions.h:807
RECT * srcrect
Definition swell-functions.h:1004
void * HINSTANCE
Definition swell-types.h:212
uintptr_t UINT_PTR
Definition swell-types.h:43
intptr_t INT_PTR
Definition swell-types.h:42
struct HGDIOBJ__ * HGDIOBJ
Definition swell-types.h:269
struct HGDIOBJ__ * HBITMAP
Definition swell-types.h:267
struct HDC__ * HDC
Definition swell-types.h:263
uch * p
Definition crypt.c:594
return c
Definition crypt.c:175
int r
Definition crypt.c:458
uch h[RAND_HEAD_LEN]
Definition crypt.c:459
b
Definition crypt.c:628
ulg size
Definition extract.c:2350
typedef int(UZ_EXP MsgFn)()