< prev index next >
src/java.desktop/windows/native/libawt/windows/awt_Win32GraphicsDevice.cpp
Print this page
*** 630,655 ****
scaleY = sy;
}
int AwtWin32GraphicsDevice::ScaleUpX(int x)
{
! return (int)ceil(x * scaleX);
}
int AwtWin32GraphicsDevice::ScaleUpY(int y)
{
! return (int)ceil(y * scaleY);
}
int AwtWin32GraphicsDevice::ScaleDownX(int x)
{
! return (int)ceil(x / scaleX);
}
int AwtWin32GraphicsDevice::ScaleDownY(int y)
{
! return (int)ceil(y / scaleY);
}
void AwtWin32GraphicsDevice::InitDesktopScales()
{
float dpiX = -1.0f;
--- 630,670 ----
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;
! }
!
! if (value > INT_MAX)
! {
! return INT_MAX;
! }
!
! return (int)ceil(value);
}
void AwtWin32GraphicsDevice::InitDesktopScales()
{
float dpiX = -1.0f;
< prev index next >