forked from old/legacy-imlib2
carsten's context stack patch... with a default context entry too.. :)
SVN revision: 4572
This commit is contained in:
parent
b753afba1d
commit
c2e1328e53
1
AUTHORS
1
AUTHORS
|
@ -18,3 +18,4 @@ Nathan Ingersoll <ningerso@d.umn.edu>
|
|||
Masa(Masahiko) Mori <masa@engr.sgi.com>
|
||||
Term (Lyle Kempler) <term@kempler.net>
|
||||
Adam Kisiel <kisiel@if.pw.edu.pl>
|
||||
Carsten Pfeiffer <carpdjih@sp.zrz.tu-berlin.de>
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
# endif
|
||||
|
||||
/* opaque data types */
|
||||
typedef void *Imlib_Context;
|
||||
typedef void *Imlib_Image;
|
||||
typedef void *Imlib_Color_Modifier;
|
||||
typedef void *Imlib_Updates;
|
||||
|
@ -93,6 +94,14 @@ extern "C"
|
|||
{
|
||||
#endif
|
||||
|
||||
/* context handling */
|
||||
Imlib_Context imlib_context_new(void);
|
||||
void imlib_context_free(Imlib_Context context);
|
||||
|
||||
void imlib_context_push(Imlib_Context context);
|
||||
void imlib_context_pop(void);
|
||||
Imlib_Context imlib_context_get(void);
|
||||
|
||||
/* context setting */
|
||||
#ifndef X_DISPLAY_MISSING
|
||||
void imlib_context_set_display(Display * display);
|
||||
|
|
|
@ -82,7 +82,7 @@ __imlib_DataCmodApply(DATA32 *data, int w, int h, int jump,
|
|||
DATA32 *p;
|
||||
DATA8 r, g, b, a;
|
||||
|
||||
/*\ We might be adding alpha \*/
|
||||
/* We might be adding alpha */
|
||||
if (fl && !(*fl & F_HAS_ALPHA))
|
||||
{
|
||||
p = data;
|
||||
|
|
10
src/image.c
10
src/image.c
|
@ -338,7 +338,7 @@ __imlib_CleanupImageCache(void)
|
|||
{
|
||||
ImlibImage *im, *im_last;
|
||||
int current_cache;
|
||||
char operation = 0;
|
||||
char operation = 1;
|
||||
|
||||
current_cache = __imlib_CurrentCacheSize();
|
||||
im_last = NULL;
|
||||
|
@ -641,8 +641,12 @@ __imlib_ListLoaders(int *num_ret)
|
|||
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
sprintf(s, "%s/" USER_LOADERS_PATH "/image/%s", home, l[i]);
|
||||
list[i] = strdup(s);
|
||||
sprintf(s, "%s/" USER_LOADERS_PATH "/image/%s", home, l[i]);
|
||||
#ifndef __EMX__
|
||||
list[pi + i] = strdup(s);
|
||||
#else
|
||||
list[pi + i] = strdup(__XOS2RedirRoot(s));
|
||||
#endif
|
||||
}
|
||||
pi = i;
|
||||
__imlib_FileFreeDirList(l, num);
|
||||
|
|
|
@ -303,7 +303,7 @@ __imlib_RenderImage(Display *d, ImlibImage *im,
|
|||
scaleinfo = __imlib_CalcScaleInfo(im, sw, sh, dw, dh, antialias);
|
||||
if (!scaleinfo) return;
|
||||
}
|
||||
/*\ Sign not needed anymore \*/
|
||||
/* Sign not needed anymore */
|
||||
dw = abs(dw); dh = abs(dh);
|
||||
ct = __imlib_GetContext(d, v, cm, depth);
|
||||
actual_depth = depth;
|
||||
|
@ -360,7 +360,7 @@ __imlib_RenderImage(Display *d, ImlibImage *im,
|
|||
/* setup h */
|
||||
h = dh;
|
||||
/* scale in LINESIZE Y chunks and convert to depth*/
|
||||
/*\ Get rgba and mask functions for XImage rendering \*/
|
||||
/* Get rgba and mask functions for XImage rendering */
|
||||
rgbaer = __imlib_GetRGBAFunction(xim->bits_per_pixel,
|
||||
v->red_mask, v->green_mask, v->blue_mask,
|
||||
hiq, ct->palette_type);
|
||||
|
@ -417,7 +417,7 @@ __imlib_RenderImage(Display *d, ImlibImage *im,
|
|||
if (m)
|
||||
__imlib_ConsumeXImage(d, mxim);
|
||||
__imlib_FreeScaleInfo(scaleinfo);
|
||||
free(back);
|
||||
if (back) free(back);
|
||||
return;
|
||||
}
|
||||
memcpy(buf, im->data + ((y + sy) * im->w) + sx,
|
||||
|
|
Loading…
Reference in New Issue