summaryrefslogtreecommitdiff
path: root/render/image.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@comhem.se>2006-11-15 21:12:06 +0000
committerMikael Magnusson <mikachu@comhem.se>2006-11-15 21:12:06 +0000
commitd3d4aa29871111737a4f6985da695c8688a05270 (patch)
tree43ef8a1fdf3ac7201855025c0a41749e08b4aa49 /render/image.c
parent59d35252dd37170a84c053dbff0fa1020e44888f (diff)
80 cols
Diffstat (limited to 'render/image.c')
-rw-r--r--render/image.c15
1 files changed, 10 insertions, 5 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;
}
}