{
overlayPhysicalBoundsF = _CoordinateSystemUtils::Transform(CoordinateSystem::AlignToDevice(overlaylLogicalBoundsF));
overlayPhysicalBounds = _CoordinateSystemUtils::ConvertToInteger(overlayPhysicalBoundsF);
+
+ int unitWidth = OverlayRegion::GetWidthUnit();
+ if(overlayPhysicalBounds.width % unitWidth == 1)
+ {
+ overlayPhysicalBounds.width -= 1;
+ }
+ else if (overlayPhysicalBounds.width % unitWidth == (unitWidth - 1))
+ {
+ overlayPhysicalBounds.width += 1;
+ }
+
+ int unitHeight = OverlayRegion::GetHeightUnit();
+ if(overlayPhysicalBounds.height % unitHeight == 1)
+ {
+ overlayPhysicalBounds.height -= 1;
+ }
+ else if (overlayPhysicalBounds.height % unitHeight == (unitHeight - 1))
+ {
+ overlayPhysicalBounds.height += 1;
+ }
}
SysSecureLog(NID_UI_CTRL, "The current bounds of overlay region is [%.3f, %.3f, %.3f, %.3f]"
, overlaylLogicalBoundsF.x, overlaylLogicalBoundsF.y, overlaylLogicalBoundsF.width, overlaylLogicalBoundsF.height);
-
-
//Check for using OverlayPanel simutaneously
for (int index = 0; index < GetChildCount(); index++)
{
FloatRectangle physicalBoundsF = _CoordinateSystemUtils::Transform(CoordinateSystem::AlignToDevice(logicalBoundsF));
physicalBounds = _CoordinateSystemUtils::ConvertToInteger(physicalBoundsF);
+
+ int unitWidth = _OverlayAgent::GetWidthUnit();
+ if(physicalBounds.width % unitWidth == 1)
+ {
+ physicalBounds.width -= 1;
+ }
+ else if (physicalBounds.width % unitWidth == (unitWidth - 1))
+ {
+ physicalBounds.width += 1;
+ }
+
+ int unitHeight = _OverlayAgent::GetHeightUnit();
+ if(physicalBounds.height % unitHeight == 1)
+ {
+ physicalBounds.height -= 1;
+ }
+ else if (physicalBounds.height % unitHeight == (unitHeight - 1))
+ {
+ physicalBounds.height += 1;
+ }
}