FloatRectangle tempRect = drawRect;
-
drawRect.x -= bounds.x;
drawRect.y -= bounds.y; //--> 0 - -20 = 20 : 20 - 20 = 0
if (pBitmap)
{
pBitmap->SetAlphaConstant((int)(pRenderTarget->GetOpacityFromRoot() * 255.0f));
- Rectangle outputR(drawRect.x, drawRect.y, drawRect.width, drawRect.height);
- Rectangle srcRect = outputR;
- outputR.x = rectDest.x + bounds.x;
- outputR.y = rectDest.y + bounds.y;
- outputCanvas.DrawBitmap(outputR, *pBitmap, srcRect);
+ FloatRectangle outputRect(rectDest.x + bounds.x, rectDest.y + bounds.y, drawRect.width, drawRect.height);
+ _VisualElementCoordinateSystem::ConvertRectangleToPhysicalIntegral(outputRect.x, outputRect.y, outputRect.width, outputRect.height);
+ _VisualElementCoordinateSystem::ConvertRectangleToLogical(outputRect.x, outputRect.y, outputRect.width, outputRect.height);
+
+ FloatRectangle srcRect(drawRect.x, drawRect.y, info.width, info.height);
+ _VisualElementCoordinateSystem::ConvertDimensionToLogical(srcRect.width, srcRect.height);
+
+ Rectangle outputR(outputRect.x, outputRect.y, outputRect.width, outputRect.height);
+ Rectangle srcR(srcRect.x, srcRect.y, srcRect.width, srcRect.height);
+ outputCanvas.DrawBitmap(outputR, *pBitmap, srcR);
delete pBitmap;
}
if (unlikely(needScale))
{
ConvertPointToPhysical(x, y);
- ConvertDimensionToPhysical(width, height);;
+ ConvertDimensionToPhysical(width, height);
}
}
intHeight = static_cast< int >(height);
}
+ static void ConvertRectangleToPhysicalIntegral(float& x, float& y, float& width, float& height)
+ {
+ if (unlikely(needScale))
+ {
+ ConvertPointToPhysical(x, y);
+ ConvertDimensionToPhysical(width, height);
+ }
+
+ MakeIntegralPoint(x, y);
+ MakeIntegralDimension(width, height);
+ }
+
static void ConvertDimensionToLogicalIntegral(float& width, float& height)
{
if (unlikely(needScale))
intHeight = static_cast< int >(height);
}
+ static void ConvertRectangleToLogicalIntegral(float& x, float& y, float& width, float& height)
+ {
+ if (unlikely(needScale))
+ {
+ ConvertPointToLogical(x, y);
+ ConvertDimensionToLogical(width, height);
+ }
+
+ MakeIntegralPoint(x, y);
+ MakeIntegralDimension(width, height);
+ }
+
static void ConvertDimensionToLogical(float& width, float& height)
{
if (unlikely(needScale))
}
}
+ static void ConvertRectangleToLogical(float& x, float& y, float& width, float& height)
+ {
+ if (unlikely(needScale))
+ {
+ ConvertPointToLogical(x, y);
+ ConvertDimensionToLogical(width, height);
+ }
+ }
+
static void ConvertPointToPhysical(float& x, float& y)
{
if (unlikely(needScale))