more flim

SVN revision: 971
This commit is contained in:
Carsten Haitzler 1999-10-25 23:30:01 +00:00
parent bd2e3aecaf
commit 3d43d11d22
2 changed files with 42 additions and 3 deletions

28
draw.c
View File

@ -12,7 +12,7 @@ __imlib_CreatePixmapsForImage(Display *d, Drawable w, Visual *v, int depth,
Colormap cm, ImlibImage *im, Pixmap *p, Mask *m,
int sx, int sy, int sw, int sh,
int dw, int dh,
char anitalias, char hiq, char dither_mask,
char antialias, char hiq, char dither_mask,
ImlibColorModifier *cmod)
{
ImlibImagePixmap *ip = NULL;
@ -23,7 +23,7 @@ __imlib_CreatePixmapsForImage(Display *d, Drawable w, Visual *v, int depth,
if (cmod)
mod_count = cmod->modification_count;
ip = __imlib_FindCachedImagePixmap(im, dw, dh, d, v, depth, sx, sy,
sw, sh, cm, anitalias, hiq, dither_mask,
sw, sh, cm, antialias, hiq, dither_mask,
mod_count);
if (ip)
{
@ -45,8 +45,30 @@ __imlib_CreatePixmapsForImage(Display *d, Drawable w, Visual *v, int depth,
*m = mask;
}
__imlib_RenderImage(d, im, pmap, mask, v, cm, depth, sx, sy, sw, sh, 0, 0,
dw, dh, anitalias, hiq, 0, dither_mask, cmod,
dw, dh, antialias, hiq, 0, dither_mask, cmod,
OP_COPY);
ip = __imlib_ProduceImagePixmap();
ip->visual = v;
ip->depth = depth;
ip->image = im;
ip->border.left = im->border.left;
ip->border.right = im->border.right;
ip->border.top = im->border.top;
ip->border.bottom = im->border.bottom;
ip->colormap = cm;
ip->display = d;
ip->w = dw;
ip->h = dh;
ip->source_x = sx;
ip->source_y = sy;
ip->source_w = sw;
ip->source_h = sh;
ip->antialias = antialias;
ip->modification_count = mod_count;
ip->dither_mask = dither_mask;
ip->hi_quality = hiq;
ip->references = 1;
__imlib_AddImagePixmapToCache(ip);
return 1;
}

17
image.c
View File

@ -279,6 +279,23 @@ __imlib_FindCachedImagePixmap(ImlibImage *im, int w, int h, Display *d, Visual *
return NULL;
}
ImlibImagePixmap *
__imlib_FindCachedImagePixmapByID(Display *d, Pixmap p)
{
ImlibImagePixmap *ip;
ip = pixmaps;
/* go through the pixmap list */
while (ip)
{
/* if all the pixmap attributes match */
if ((ip->pixmap == p) && (ip->display == d))
return ip;
ip = ip->next;
}
return NULL;
}
void
__imlib_AddImagePixmapToCache(ImlibImagePixmap *ip)
{