summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
Diffstat (limited to 'render')
-rw-r--r--render/image.c15
-rw-r--r--render/render.c9
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);