]> Dogcows Code - chaz/openbox/blobdiff - render/image.c
dont free random stuff
[chaz/openbox] / render / image.c
index 3c08444db14116ddf32f604fcc7d262cb8711358..e6e8b8b932f185a9d768592f8a83d8e9cfdca761 100644 (file)
@@ -152,7 +152,8 @@ void RrImageDraw(RrPixel32 *target, RrTextureRGBA *rgba,
     while (num_pixels-- > 0) {
         guchar alpha, r, g, b, bgr, bgg, bgb;
 
-        alpha = *source >> RrDefaultAlphaOffset;
+        /* apply the rgba's opacity as well */
+        alpha = (((*source >> RrDefaultAlphaOffset) * rgba->alpha) >> 8)&0xff;
         r = *source >> RrDefaultRedOffset;
         g = *source >> RrDefaultGreenOffset;
         b = *source >> RrDefaultBlueOffset;
This page took 0.020175 seconds and 4 git commands to generate.