template <typename ValueType>
Point<ValueType> Displays::logicalToPhysical (Point<ValueType> point, const Display* useScaleFactorOfDisplay) const noexcept
{
auto& display = useScaleFactorOfDisplay != nullptr ? *useScaleFactorOfDisplay
: findDisplayForPoint (point.roundToInt(), false);
auto globalScale = Desktop::getInstance().getGlobalScaleFactor();
Point<ValueType> logicalTopLeft (display.totalArea.getX(), display.totalArea.getY());
Point<ValueType> physicalTopLeft (display.topLeftPhysical.getX(), display.topLeftPhysical.getY());
return ((point - (logicalTopLeft * globalScale)) * (display.scale / globalScale)) + physicalTopLeft;
}
as per @Rail_Jon_Rogut this causes a linker error:
Displays::Display mainDisplay = Desktop::getInstance().getDisplays().getMainDisplay();
Point<int> coordinates = { 100, 100 };
coordinates = Desktop::getInstance().getDisplays().logicalToPhysical (coordinates, &mainDisplay);
Looks like you guys forgot to explicitly instantiate the template in the cpp file?
