< prev index next >
src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsDevice.cpp
Print this page
*** 630,659 ****
scaleY = sy;
}
int AwtWin32GraphicsDevice::ScaleUpX(int x)
{
! return CheckIntLimits(x * scaleX);
}
int AwtWin32GraphicsDevice::ScaleUpY(int y)
{
! return CheckIntLimits(y * scaleY);
}
int AwtWin32GraphicsDevice::ScaleDownX(int x)
{
! return CheckIntLimits(x / scaleX);
}
int AwtWin32GraphicsDevice::ScaleDownY(int y)
{
! return CheckIntLimits(y / scaleY);
}
! int AwtWin32GraphicsDevice::CheckIntLimits(double value)
{
if (value < INT_MIN)
{
return INT_MIN;
}
--- 630,660 ----
scaleY = sy;
}
int AwtWin32GraphicsDevice::ScaleUpX(int x)
{
! return ClipRound(x * scaleX);
}
int AwtWin32GraphicsDevice::ScaleUpY(int y)
{
! return ClipRound(y * scaleY);
}
int AwtWin32GraphicsDevice::ScaleDownX(int x)
{
! return ClipRound(x / scaleX);
}
int AwtWin32GraphicsDevice::ScaleDownY(int y)
{
! return ClipRound(y / scaleY);
}
! int AwtWin32GraphicsDevice::ClipRound(double value)
{
+ value -= 0.5;
if (value < INT_MIN)
{
return INT_MIN;
}
< prev index next >