forked from old/legacy-imlib2
added AUTHORS file.. fixed copyting....
SVN revision: 1205
This commit is contained in:
parent
0b486d8824
commit
d7dee5c099
|
@ -0,0 +1,3 @@
|
|||
The Rasterman (Carsten Haitzler) <raster@rasterman.com> <raster@valinux.com>
|
||||
Ryan Gustafson <ryan_gustafson@yahoo.com>
|
||||
Mandrake (Geoff Harrison) <mandrake@mandrake.net>
|
6
COPYING
6
COPYING
|
@ -1,5 +1,5 @@
|
|||
Copyright (C) 1999 Carsten Haitzler and various contributors
|
||||
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
|
@ -8,7 +8,9 @@ sell copies of the Software, and to permit persons to whom the Software is
|
|||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
all copies of the Software, its documentation and marketing & publicity
|
||||
materials, and acknowledgment shall be given in the documentation, materials
|
||||
and software packages that this Software was used.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
|
|
54
demo/blend.c
54
demo/blend.c
|
@ -67,46 +67,20 @@ main (int argc, char **argv)
|
|||
x4 = 0;
|
||||
for(;;)
|
||||
{
|
||||
imlib_blend_image_onto_image(bg_im, im, 0, 0, 0,
|
||||
0, 0, image_width, image_height,
|
||||
0, 0, image_width, image_height,
|
||||
NULL, IMLIB_OP_COPY);
|
||||
imlib_blend_image_onto_image(fog1_im, im, 0, 1, 0,
|
||||
0, 0, image_width, image_height,
|
||||
-x1, 0, image_width, image_height,
|
||||
NULL, IMLIB_OP_COPY);
|
||||
imlib_blend_image_onto_image(fog1_im, im, 0, 1, 0,
|
||||
0, 0, image_width, image_height,
|
||||
image_width - x1, 0, image_width, image_height,
|
||||
NULL, IMLIB_OP_COPY);
|
||||
imlib_blend_image_onto_image(fog2_im, im, 0, 1, 0,
|
||||
0, 0, image_width, image_height,
|
||||
- x2, 0, image_width, image_height,
|
||||
NULL, IMLIB_OP_COPY);
|
||||
imlib_blend_image_onto_image(fog2_im, im, 0, 1, 0,
|
||||
0, 0, image_width, image_height,
|
||||
image_width - x2, 0, image_width, image_height,
|
||||
NULL, IMLIB_OP_COPY);
|
||||
imlib_blend_image_onto_image(logo_im, im, 0, 1, 0,
|
||||
0, 0, image_width, image_height,
|
||||
0, 0, image_width, image_height,
|
||||
NULL, IMLIB_OP_COPY);
|
||||
imlib_blend_image_onto_image(fog3_im, im, 0, 1, 0,
|
||||
0, 0, image_width, image_height,
|
||||
-x3, 0, image_width, image_height,
|
||||
NULL, IMLIB_OP_COPY);
|
||||
imlib_blend_image_onto_image(fog3_im, im, 0, 1, 0,
|
||||
0, 0, image_width, image_height,
|
||||
image_width - x3, 0, image_width, image_height,
|
||||
NULL, IMLIB_OP_COPY);
|
||||
imlib_blend_image_onto_image(fog4_im, im, 0, 1, 0,
|
||||
0, 0, image_width, image_height,
|
||||
- x4, 0, image_width, image_height,
|
||||
NULL, IMLIB_OP_COPY);
|
||||
imlib_blend_image_onto_image(fog4_im, im, 0, 1, 0,
|
||||
0, 0, image_width, image_height,
|
||||
image_width - x4, 0, image_width, image_height,
|
||||
NULL, IMLIB_OP_COPY);
|
||||
imlib_blend_image_onto_image(bg_im, im, 0, 0, 0, 0, 0, image_width, image_height, 0, 0, image_width, image_height, NULL, IMLIB_OP_COPY);
|
||||
imlib_blend_image_onto_image(fog1_im, im, 0, 1, 0, 0, 0, image_width, image_height, - x1, 0, image_width, image_height, NULL, IMLIB_OP_COPY);
|
||||
imlib_blend_image_onto_image(fog1_im, im, 0, 1, 0, 0, 0, image_width, image_height, image_width - x1, 0, image_width, image_height, NULL, IMLIB_OP_COPY);
|
||||
/*
|
||||
imlib_blend_image_onto_image(fog2_im, im, 0, 1, 0, 0, 0, image_width, image_height, - x2, 0, image_width, image_height, NULL, IMLIB_OP_COPY);
|
||||
imlib_blend_image_onto_image(fog2_im, im, 0, 1, 0, 0, 0, image_width, image_height, image_width - x2, 0, image_width, image_height, NULL, IMLIB_OP_COPY);
|
||||
*/
|
||||
imlib_blend_image_onto_image(logo_im, im, 0, 1, 0, 0, 0, image_width, image_height, 0, 0, image_width, image_height, NULL, IMLIB_OP_COPY);
|
||||
/*
|
||||
imlib_blend_image_onto_image(fog3_im, im, 0, 1, 0, 0, 0, image_width, image_height, - x3, 0, image_width, image_height, NULL, IMLIB_OP_COPY);
|
||||
imlib_blend_image_onto_image(fog3_im, im, 0, 1, 0, 0, 0, image_width, image_height, image_width - x3, 0, image_width, image_height, NULL, IMLIB_OP_COPY);
|
||||
*/
|
||||
imlib_blend_image_onto_image(fog4_im, im, 0, 1, 0, 0, 0, image_width, image_height, - x4, 0, image_width, image_height, NULL, IMLIB_OP_COPY);
|
||||
imlib_blend_image_onto_image(fog4_im, im, 0, 1, 0, 0, 0, image_width, image_height, image_width - x4, 0, image_width, image_height, NULL, IMLIB_OP_COPY);
|
||||
imlib_render_image_part_on_drawable_at_size(im,
|
||||
disp, win, vis, cm, depth,
|
||||
0, 1, 0,
|
||||
|
|
1766
src/blend.c
1766
src/blend.c
File diff suppressed because it is too large
Load Diff
112
src/blend.h
112
src/blend.h
|
@ -11,6 +11,12 @@ enum _imlibop
|
|||
|
||||
typedef enum _imlibop ImlibOp;
|
||||
|
||||
typedef void (*ImlibBlendFunction)(DATA32*, int, DATA32*, int, int, int,
|
||||
ImlibColorModifier *);
|
||||
|
||||
ImlibBlendFunction
|
||||
__imlib_GetBlendFunction(ImlibOp op, char merge_alpha, char blend,
|
||||
ImlibColorModifier * cm);
|
||||
void
|
||||
__imlib_BlendImageToImage(ImlibImage *im_src, ImlibImage *im_dst,
|
||||
char aa, char blend, char merge_alpha,
|
||||
|
@ -20,108 +26,6 @@ __imlib_BlendImageToImage(ImlibImage *im_src, ImlibImage *im_dst,
|
|||
void
|
||||
__imlib_BlendRGBAToData(DATA32 *src, int src_w, int src_h, DATA32 *dst,
|
||||
int dst_w, int dst_h, int sx, int sy, int dx, int dy,
|
||||
int w, int h, char dalpha, ImlibColorModifier *cm,
|
||||
ImlibOp op);
|
||||
void
|
||||
__imlib_BlendRGBAToRGB(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h);
|
||||
void
|
||||
__imlib_BlendRGBAToRGBA(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h);
|
||||
void
|
||||
__imlib_CopyRGBAToRGB(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h);
|
||||
void
|
||||
__imlib_CopyRGBAToRGBA(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h);
|
||||
void
|
||||
__imlib_AddBlendRGBAToRGB(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h);
|
||||
void
|
||||
__imlib_AddBlendRGBAToRGBA(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h);
|
||||
void
|
||||
__imlib_AddCopyRGBAToRGB(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h);
|
||||
void
|
||||
__imlib_AddCopyRGBAToRGBA(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h);
|
||||
void
|
||||
__imlib_SubBlendRGBAToRGB(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h);
|
||||
void
|
||||
__imlib_SubBlendRGBAToRGBA(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h);
|
||||
void
|
||||
__imlib_SubCopyRGBAToRGB(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h);
|
||||
void
|
||||
__imlib_SubCopyRGBAToRGBA(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h);
|
||||
void
|
||||
__imlib_ReBlendRGBAToRGB(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h);
|
||||
void
|
||||
__imlib_ReBlendRGBAToRGBA(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h);
|
||||
void
|
||||
__imlib_ReCopyRGBAToRGB(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h);
|
||||
void
|
||||
__imlib_ReCopyRGBAToRGBA(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h);
|
||||
void
|
||||
__imlib_BlendRGBAToRGB(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h);
|
||||
void
|
||||
__imlib_BlendRGBAToRGBA(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h);
|
||||
void
|
||||
__imlib_BlendRGBAToRGBCmod(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h, ImlibColorModifier *cm);
|
||||
void
|
||||
__imlib_BlendRGBAToRGBACmod(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h, ImlibColorModifier *cm);
|
||||
void
|
||||
__imlib_CopyRGBAToRGBCmod(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h, ImlibColorModifier *cm);
|
||||
void
|
||||
__imlib_CopyRGBAToRGBACmod(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h, ImlibColorModifier *cm);
|
||||
void
|
||||
__imlib_AddBlendRGBAToRGBCmod(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h, ImlibColorModifier *cm);
|
||||
void
|
||||
__imlib_AddBlendRGBAToRGBACmod(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h, ImlibColorModifier *cm);
|
||||
void
|
||||
__imlib_AddCopyRGBAToRGBCmod(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h, ImlibColorModifier *cm);
|
||||
void
|
||||
__imlib_AddCopyRGBAToRGBACmod(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h, ImlibColorModifier *cm);
|
||||
void
|
||||
__imlib_SubBlendRGBAToRGBCmod(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h, ImlibColorModifier *cm);
|
||||
void
|
||||
__imlib_SubBlendRGBAToRGBACmod(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h, ImlibColorModifier *cm);
|
||||
void
|
||||
__imlib_SubCopyRGBAToRGBCmod(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h, ImlibColorModifier *cm);
|
||||
void
|
||||
__imlib_SubCopyRGBAToRGBACmod(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h, ImlibColorModifier *cm);
|
||||
void
|
||||
__imlib_ReBlendRGBAToRGBCmod(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h, ImlibColorModifier *cm);
|
||||
void
|
||||
__imlib_ReBlendRGBAToRGBACmod(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h, ImlibColorModifier *cm);
|
||||
void
|
||||
__imlib_ReCopyRGBAToRGBCmod(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h, ImlibColorModifier *cm);
|
||||
void
|
||||
__imlib_ReCopyRGBAToRGBACmod(DATA32 *src, int src_jump, DATA32 *dst, int dst_jump,
|
||||
int w, int h, ImlibColorModifier *cm);
|
||||
int w, int h, char blend, char merge_alpha,
|
||||
ImlibColorModifier *cm, ImlibOp op);
|
||||
#endif
|
||||
|
|
14
src/font.c
14
src/font.c
|
@ -563,16 +563,10 @@ __imlib_render_str(ImlibImage *im, ImlibFont *fn, int drx, int dry, char *text,
|
|||
break;
|
||||
}
|
||||
tmp = im2.data;
|
||||
if (IMAGE_HAS_ALPHA(im))
|
||||
__imlib_BlendRGBAToData(tmp, im2.w, im2.h,
|
||||
im->data, im->w, im->h,
|
||||
0, 0, drx, dry, im2.w, im2.h,
|
||||
1, NULL, op);
|
||||
else
|
||||
__imlib_BlendRGBAToData(tmp, im2.w, im2.h,
|
||||
im->data, im->w, im->h,
|
||||
0, 0, drx, dry, im2.w, im2.h,
|
||||
0, NULL, op);
|
||||
__imlib_BlendRGBAToData(tmp, im2.w, im2.h,
|
||||
im->data, im->w, im->h,
|
||||
0, 0, drx, dry, im2.w, im2.h,
|
||||
1, IMAGE_HAS_ALPHA(im), NULL, op);
|
||||
free(tmp);
|
||||
__imlib_destroy_font_raster(rmap);
|
||||
}
|
||||
|
|
20
src/rend.c
20
src/rend.c
|
@ -251,23 +251,9 @@ __imlib_RenderImage(Display *d, ImlibImage *im,
|
|||
/* if we have a back buffer - we're blending to the bg */
|
||||
if (back)
|
||||
{
|
||||
switch (op)
|
||||
{
|
||||
case OP_COPY:
|
||||
__imlib_BlendRGBAToRGB(pointer, jump, back + (y * dw), 0, dw, hh);
|
||||
break;
|
||||
case OP_ADD:
|
||||
__imlib_AddBlendRGBAToRGB(pointer, jump, back + (y * dw), 0, dw, hh);
|
||||
break;
|
||||
case OP_SUBTRACT:
|
||||
__imlib_SubBlendRGBAToRGB(pointer, jump, back + (y * dw), 0, dw, hh);
|
||||
break;
|
||||
case OP_RESHADE:
|
||||
__imlib_ReBlendRGBAToRGB(pointer, jump, back + (y * dw), 0, dw, hh);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ImlibBlendFunction blender = NULL;
|
||||
blender = __imlib_GetBlendFunction(op, 1, 0, NULL);
|
||||
blender(pointer, jump, back + (y * dw), 0, dw, hh, NULL);
|
||||
pointer = back + (y * dw);
|
||||
jump = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue