SysTryReturnResult(NID_GRP, BITMAP_IS_VALID(bitmap), E_INVALID_ARG, "The source bitmap is invalid.");
+ // This code is executed using neon.acceleration.
+ {
+ bool isXEqualToInteger = _Util::Abs(vcPointF.x - int(vcPointF.x)) <= 0.01;
+ bool isYEqualToInteger = _Util::Abs(vcPointF.y - int(vcPointF.y)) <= 0.01;
+
+ bool isCompositeModeUnbound = GetCompositeMode() == COMPOSITE_MODE_SRC_IN
+ || GetCompositeMode() == COMPOSITE_MODE_DST_IN
+ || GetCompositeMode() == COMPOSITE_MODE_SRC_OUT
+ || GetCompositeMode() == COMPOSITE_MODE_DST_ATOP;
+
+ if (isXEqualToInteger && isYEqualToInteger && !isCompositeModeUnbound)
+ {
+ return this->DrawBitmap(Point(int(vcPointF.x), int(vcPointF.y)), bitmap);
+ }
+ }
+
FloatRectangle rtCanvasF = _GetBoundsRelF(*this);
if (rtCanvasF.IsEmpty())
{
SysTryReturn(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.");
+ int dashValue = 0;
+
+ for (int i = 0; i < pattern.GetCount(); i++)
+ {
+ pattern.GetAt(i, dashValue);
+ SysTryReturn(NID_GRP, dashValue >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] One of the values of the specified pattern is negative(%d).", dashValue);
+ }
+
result r = E_SUCCESS;
// It is NOT the strong guarantee for an exception
{
SysTryReturn(NID_GRP, INSTANCE_IS_VALID, E_OPERATION_FAILED, E_OPERATION_FAILED, "[E_OPERATION_FAILED] This instance is not constructed yet.");
+ float dashValue = 0.0f;
+
+ for (int i = 0; i < pattern.GetCount(); i++)
+ {
+ pattern.GetAt(i, dashValue);
+ SysTryReturn(NID_GRP, dashValue >= 0.0f, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] One of the values of the specified pattern is negative(%f).", dashValue);
+ }
+
result r = E_SUCCESS;
// It is NOT the strong guarantee for an exception
}
{
- float dashIntValue = 0.0f;
+ float dashFloatValue = 0.0f;
Tizen::Graphics::_Util::AccumList<double> dashValueList;
for (int i = 0; i < pattern.GetCount(); i++)
{
- pattern.GetAt(i, dashIntValue);
- dashValueList.Push(double(dashIntValue));
+ pattern.GetAt(i, dashFloatValue);
+ dashValueList.Push(double(dashFloatValue));
}
r = this->_pNativeCanvas->SetDashPattern(dashValueList, double(offset));