bugfix for DrawBitmap Display
authorSungyeon Woo <s.woo@samsung.com>
Sat, 23 Mar 2013 05:44:07 +0000 (14:44 +0900)
committerSungyeon Woo <s.woo@samsung.com>
Sat, 23 Mar 2013 05:44:07 +0000 (14:44 +0900)
Change-Id: I769b0e76c0c0d68e3ecd35971ddc5987cd1aa59c
Signed-off-by: Sungyeon Woo <s.woo@samsung.com>
src/graphics/FGrp_CanvasImpl.cpp
src/graphics/util/FGrp_UtilPixmap.cpp

index bd0b67b..169289e 100644 (file)
@@ -1382,7 +1382,7 @@ _CanvasImpl::DrawBitmap(const FloatRectangle& vcDestRectF, const _BitmapImpl& sr
 
                FloatRectangle pcDestRectF = _ResUtil::ConvertToPhyCoord(vcDestRectF);
 
-               Rectangle pcDestRect(_FloatToIntForPos(pcDestRectF.x), _FloatToIntForPos(pcDestRectF.y), _FloatToIntForSize(vcDestRectF.width), _FloatToIntForSize(vcDestRectF.height));
+               Rectangle pcDestRect(_FloatToIntForPos(pcDestRectF.x), _FloatToIntForPos(pcDestRectF.y), _FloatToIntForSize(pcDestRectF.width), _FloatToIntForSize(pcDestRectF.height));
 
                if (lazyScaling)
                {
index 1551f32..39a5e04 100755 (executable)
@@ -466,28 +466,28 @@ _Util::Pixmap::ConvertNonpremultiplied(void)
        {
                for (int x = 0; x < this->width; x++)
                {
-                       DestPixel a = (*p >> 24);\r
-\r
-                       if (a > 0 && a < 254)\r
-                       {\r
-                               a += (a >> 7);\r
-\r
-                               DestPixel r = (*p >> 8) & 0x0000FF00;\r
-                               r = r / a;\r
-                               r = (r > 255) ? 255 : r;\r
-\r
-                               DestPixel g = (*p >> 0) & 0x0000FF00;\r
-                               g = g / a;\r
-                               g = (g > 255) ? 255 : g;\r
-\r
-                               DestPixel b = (*p << 8) & 0x0000FF00;\r
-                               b = b / a;\r
-                               b = (b > 255) ? 255 : b;\r
-\r
-                               *p = (*p & 0xFF000000) | (r << 16) | (g << 8) | b;\r
-                       }\r
-\r
-                       p++;\r
+                       DestPixel a = (*p >> 24);
+
+                       if (a > 0 && a < 254)
+                       {
+                               a += (a >> 7);
+
+                               DestPixel r = (*p >> 8) & 0x0000FF00;
+                               r = r / a;
+                               r = (r > 255) ? 255 : r;
+
+                               DestPixel g = (*p >> 0) & 0x0000FF00;
+                               g = g / a;
+                               g = (g > 255) ? 255 : g;
+
+                               DestPixel b = (*p << 8) & 0x0000FF00;
+                               b = b / a;
+                               b = (b > 255) ? 255 : b;
+
+                               *p = (*p & 0xFF000000) | (r << 16) | (g << 8) | b;
+                       }
+
+                       p++;
                }
 
                p = reinterpret_cast<DestPixel*>(reinterpret_cast<unsigned char*>(p) + paddingBytes);