mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fixed some conversion warnings in the Display coordinate conversion methods
This commit is contained in:
parent
9f17e0cde8
commit
31f6f9993b
1 changed files with 4 additions and 4 deletions
|
|
@ -116,8 +116,8 @@ Point<ValueType> Displays::physicalToLogical (Point<ValueType> point, const Disp
|
|||
|
||||
auto globalScale = Desktop::getInstance().getGlobalScaleFactor();
|
||||
|
||||
Point<ValueType> logicalTopLeft (display.totalArea.getX(), display.totalArea.getY());
|
||||
Point<ValueType> physicalTopLeft (display.topLeftPhysical.getX(), display.topLeftPhysical.getY());
|
||||
Point<ValueType> logicalTopLeft (static_cast<ValueType> (display.totalArea.getX()), static_cast<ValueType> (display.totalArea.getY()));
|
||||
Point<ValueType> physicalTopLeft (static_cast<ValueType> (display.topLeftPhysical.getX()), static_cast<ValueType> (display.topLeftPhysical.getY()));
|
||||
|
||||
return ((point - physicalTopLeft) / (display.scale / globalScale)) + (logicalTopLeft * globalScale);
|
||||
}
|
||||
|
|
@ -130,8 +130,8 @@ Point<ValueType> Displays::logicalToPhysical (Point<ValueType> point, const Disp
|
|||
|
||||
auto globalScale = Desktop::getInstance().getGlobalScaleFactor();
|
||||
|
||||
Point<ValueType> logicalTopLeft (display.totalArea.getX(), display.totalArea.getY());
|
||||
Point<ValueType> physicalTopLeft (display.topLeftPhysical.getX(), display.topLeftPhysical.getY());
|
||||
Point<ValueType> logicalTopLeft (static_cast<ValueType> (display.totalArea.getX()), static_cast<ValueType> (display.totalArea.getY()));
|
||||
Point<ValueType> physicalTopLeft (static_cast<ValueType> (display.topLeftPhysical.getX()), static_cast<ValueType> (display.topLeftPhysical.getY()));
|
||||
|
||||
return ((point - (logicalTopLeft * globalScale)) * (display.scale / globalScale)) + physicalTopLeft;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue