- return true;
- }
-
- pixman_op_t rop = Tizen::Graphics::_Pixman::GetRop(compositeMode);
-
- pixman_filter_t filter = Tizen::Graphics::_Pixman::GetFilter(drawingQuality);
-
- pixman_transform_t transform;
- pixman_transform_init_identity(&transform);
-
- pixman_region32_t clipRect, dstRect;
- pixman_region32_init_rect (&clipRect, xDest, yDest, wDest, hDest);
- pixman_region32_init_rect (&dstRect, 0, 0, dstImage.width, dstImage.height);
- pixman_region32_intersect (&dstRect, &clipRect, &dstRect);
+ case PIXMAN_OP_CLEAR:
+ case PIXMAN_OP_SRC:
+ {
+ int dstX1 = int(floor(xDest));
+ int dstX2 = int(ceil(xDest + srcImage.width));
+ int dstY1 = int(floor(yDest));
+ int dstY2 = int(ceil(yDest + srcImage.height));
+
+ Tizen::Graphics::_Util::Pixmap dstImageSub = dstImage.GetSubBitmap(dstX1, dstY1, dstX2 - dstX1, dstY2 - dstY1);
+ Tizen::Graphics::_Util::Pixmap srcImageSub = srcImage.GetSubBitmap((dstX1 >= 0) ? 0 : -dstX1, (dstY1 >= 0) ? 0 : -dstY1, srcImage.width, srcImage.height);
+
+ pixman_transform_t transform;
+ pixman_transform_init_identity(&transform);
+ pixman_transform_translate(&transform, NULL, pixman_double_to_fixed(dstX1 -(xDest - 0.5)), pixman_double_to_fixed(dstY1 -(yDest - 0.5)));
+ return CompositePixmap(dstImageSub, srcImageSub, rop, filter, transform, PIXMAN_REPEAT_NONE);
+ }
+ default:
+ {
+ pixman_transform_t transform;
+ pixman_transform_init_identity(&transform);
+ pixman_transform_translate(&transform, NULL, pixman_double_to_fixed(-(xDest - 0.5)), pixman_double_to_fixed(-(yDest - 0.5)));