app: remove color_pixels()
This commit is contained in:
@ -24,101 +24,6 @@
|
||||
#define __PAINT_FUNCS_GENERIC_H__
|
||||
|
||||
|
||||
void
|
||||
color_pixels (guchar *dest,
|
||||
const guchar *color,
|
||||
guint w,
|
||||
guint bytes)
|
||||
{
|
||||
switch (bytes)
|
||||
{
|
||||
case 1:
|
||||
memset (dest, *color, w);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
#if defined(sparc) || defined(__sparc__)
|
||||
{
|
||||
const guchar c0 = color[0];
|
||||
const guchar c1 = color[1];
|
||||
|
||||
while (w--)
|
||||
{
|
||||
dest[0] = c0;
|
||||
dest[1] = c1;
|
||||
dest += 2;
|
||||
}
|
||||
}
|
||||
#else
|
||||
{
|
||||
const guint16 shortc = ((const guint16 *) color)[0];
|
||||
guint16 *shortd = (guint16 *) dest;
|
||||
|
||||
while (w--)
|
||||
{
|
||||
*shortd = shortc;
|
||||
shortd++;
|
||||
}
|
||||
}
|
||||
#endif /* sparc || __sparc__ */
|
||||
break;
|
||||
|
||||
case 3:
|
||||
{
|
||||
const guchar c0 = color[0];
|
||||
const guchar c1 = color[1];
|
||||
const guchar c2 = color[2];
|
||||
|
||||
while (w--)
|
||||
{
|
||||
dest[0] = c0;
|
||||
dest[1] = c1;
|
||||
dest[2] = c2;
|
||||
dest += 3;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
#if defined(sparc) || defined(__sparc__)
|
||||
{
|
||||
const guchar c0 = color[0];
|
||||
const guchar c1 = color[1];
|
||||
const guchar c2 = color[2];
|
||||
const guchar c3 = color[3];
|
||||
|
||||
while (w--)
|
||||
{
|
||||
dest[0] = c0;
|
||||
dest[1] = c1;
|
||||
dest[2] = c2;
|
||||
dest[3] = c3;
|
||||
dest += 4;
|
||||
}
|
||||
}
|
||||
#else
|
||||
{
|
||||
const guint32 longc = ((const guint32 *) color)[0];
|
||||
guint32 *longd = (guint32 *) dest;
|
||||
|
||||
while (w--)
|
||||
{
|
||||
*longd = longc;
|
||||
longd++;
|
||||
}
|
||||
}
|
||||
#endif /* sparc || __sparc__ */
|
||||
break;
|
||||
|
||||
default:
|
||||
while (w--)
|
||||
{
|
||||
memcpy (dest, color, bytes);
|
||||
dest += bytes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* blend_pixels patched 8-24-05 to fix bug #163721. Note that this change
|
||||
* causes the function to treat src1 and src2 asymmetrically. This gives the
|
||||
|
@ -21,11 +21,6 @@
|
||||
|
||||
/* Paint functions */
|
||||
|
||||
void color_pixels (guchar *dest,
|
||||
const guchar *color,
|
||||
guint w,
|
||||
guint bytes);
|
||||
|
||||
void blend_pixels (const guchar *src1,
|
||||
const guchar *src2,
|
||||
guchar *dest,
|
||||
|
Reference in New Issue
Block a user