diff options
| author | Mikael Magnusson <mikachu@comhem.se> | 2006-11-15 21:12:06 +0000 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@comhem.se> | 2006-11-15 21:12:06 +0000 |
| commit | d3d4aa29871111737a4f6985da695c8688a05270 (patch) | |
| tree | 43ef8a1fdf3ac7201855025c0a41749e08b4aa49 /render | |
| parent | 59d35252dd37170a84c053dbff0fa1020e44888f (diff) | |
80 cols
Diffstat (limited to 'render')
| -rw-r--r-- | render/image.c | 15 | ||||
| -rw-r--r-- | render/render.c | 9 |
2 files changed, 16 insertions, 8 deletions
diff --git a/render/image.c b/render/image.c index e67077fa..aa30ee62 100644 --- a/render/image.c +++ b/render/image.c @@ -79,11 +79,16 @@ static void ImageCopyResampled(RrPixel32 *dst, RrPixel32 *src, portionXY = (portionX * portionY) >> FRACTION; sumXY += portionXY; - pixel = *(src + (srcY >> FRACTION) * srcW + (srcX >> FRACTION)); - red += ((pixel >> RrDefaultRedOffset) & 0xFF) * portionXY; - green += ((pixel >> RrDefaultGreenOffset) & 0xFF) * portionXY; - blue += ((pixel >> RrDefaultBlueOffset) & 0xFF) * portionXY; - alpha += ((pixel >> RrDefaultAlphaOffset) & 0xFF) * portionXY; + pixel = *(src + (srcY >> FRACTION) * srcW + + (srcX >> FRACTION)); + red += ((pixel >> RrDefaultRedOffset) & 0xFF) + * portionXY; + green += ((pixel >> RrDefaultGreenOffset) & 0xFF) + * portionXY; + blue += ((pixel >> RrDefaultBlueOffset) & 0xFF) + * portionXY; + alpha += ((pixel >> RrDefaultAlphaOffset) & 0xFF) + * portionXY; } } diff --git a/render/render.c b/render/render.c index 77541f6d..fd95469c 100644 --- a/render/render.c +++ b/render/render.c @@ -114,7 +114,8 @@ void RrPaint(RrAppearance *a, Window win, gint w, gint h) case RR_TEXTURE_TEXT: if (!transferred) { transferred = 1; - if ((a->surface.grad != RR_SURFACE_SOLID) || (a->surface.interlaced)) + if ((a->surface.grad != RR_SURFACE_SOLID) + || (a->surface.interlaced)) pixel_data_to_pixmap(a, 0, 0, w, h); } if (a->xftdraw == NULL) { @@ -127,7 +128,8 @@ void RrPaint(RrAppearance *a, Window win, gint w, gint h) case RR_TEXTURE_LINE_ART: if (!transferred) { transferred = 1; - if ((a->surface.grad != RR_SURFACE_SOLID) || (a->surface.interlaced)) + if ((a->surface.grad != RR_SURFACE_SOLID) + || (a->surface.interlaced)) pixel_data_to_pixmap(a, 0, 0, w, h); } XDrawLine(RrDisplay(a->inst), a->pixmap, @@ -140,7 +142,8 @@ void RrPaint(RrAppearance *a, Window win, gint w, gint h) case RR_TEXTURE_MASK: if (!transferred) { transferred = 1; - if ((a->surface.grad != RR_SURFACE_SOLID) || (a->surface.interlaced)) + if ((a->surface.grad != RR_SURFACE_SOLID) + || (a->surface.interlaced)) pixel_data_to_pixmap(a, 0, 0, w, h); } RrPixmapMaskDraw(a->pixmap, &a->texture[i].data.mask, &tarea); |
