image.c for the Openbox window manager
Copyright (c) 2006 Mikael Magnusson
- Copyright (c) 2003 Ben Jansens
+ Copyright (c) 2003-2007 Dana Jansens
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
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;
}
}