{
if (!this->__useStableRenderer && srcBufferInfo.bitsPerPixel == 32 && (GetCompositeMode() != COMPOSITE_MODE_SRC_OVER || srcBitmap.__isPremultiplied))
{
+ _Util::Rectangle<int> srcBounds =
+ {
+ int(Math::Floor(srcRectD.x)),
+ int(Math::Floor(srcRectD.y)),
+ int(Math::Ceiling(srcRectD.x + srcRectD.w) - Math::Floor(srcRectD.x)),
+ int(Math::Ceiling(srcRectD.y + srcRectD.h) - Math::Floor(srcRectD.y))
+ };
+
_Util::Pixmap srcImageUnclipped(srcBufferInfo.width, srcBufferInfo.height, srcBufferInfo.bitsPerPixel, srcBufferInfo.pPixels, srcBufferInfo.pitch);
- _Util::Pixmap srcImage = srcImageUnclipped.GetSubBitmap(srcRect.x, srcRect.y, srcRect.w, srcRect.h);
+ _Util::Pixmap srcImage = srcImageUnclipped.GetSubBitmap(srcBounds.x, srcBounds.y, srcBounds.w, srcBounds.h);
_ApplySrcBitmapAttrib(srcImage, srcBitmap, srcBitmap.__isOpaqueAllOver);
_Util::Pixmap dstImageUnclipped(dstBufferInfo.width, dstBufferInfo.height, dstBufferInfo.bitsPerPixel, dstBufferInfo.pPixels, dstBufferInfo.pitch);
return this->DrawBitmap(FloatPoint(vcRectF.x, vcRectF.y), bitmap);
}
- if (_FloatToIntForSize(vcRectF.width) == bitmap.GetWidth() && _FloatToIntForSize(vcRectF.height) == bitmap.GetHeight())
- {
- return this->DrawBitmap(FloatPoint(vcRectF.x, vcRectF.y), bitmap);
- }
-
// check if bimap can be drew in canvas area.
FloatRectangle rtCanvasF = _GetBoundsRelF(*this);
SysTryReturnResult(NID_GRP, 0, E_OUT_OF_RANGE, "The specified region of source bitmap is out of range.");
}
- if (vcSrcRectF.width == srcBitmap.GetWidthF() && vcSrcRectF.height == srcBitmap.GetHeightF())
- {
- return this->DrawBitmap(vcDestRectF, srcBitmap);
- }
-
// check if srcRect is in bitmap's area.
result r = _Util::Validate(vcSrcRectF, FloatRectangle(0, 0, srcBitmap.GetWidthF(), srcBitmap.GetHeightF()));
{
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));
+ pixman_transform_translate(&transform, NULL, pixman_double_to_fixed(-xDest), pixman_double_to_fixed(-yDest));
return CompositePixmap(dstImage, srcImage, rop, filter, transform, PIXMAN_REPEAT_NONE);
}
}
default:
{
- pixman_transform_t transform = Tizen::Graphics::_Pixman::GetTransform(srcImage.width, srcImage.height, xDest-0.5, yDest-0.5, wDest, hDest);
+ pixman_transform_t transform = Tizen::Graphics::_Pixman::GetTransform(srcImage.width, srcImage.height, xDest, yDest, wDest, hDest);
return CompositePixmap(dstImage, srcImage, rop, filter, transform, PIXMAN_REPEAT_NONE);
}