Added love.window.toPixels(x [, y]) and love.window.fromPixels(x [, y]), for easier conversion between window-space and pixel-space values when highdpi mode is enabled on a retina display in OS X (and in the iOS and Android ports of LÖVE.)

This commit is contained in:
Alex Szpakowski
2014-09-14 15:58:37 -03:00
parent f972c9923f
commit 00944c5f5d
7 changed files with 96 additions and 20 deletions
+5
View File
@@ -148,6 +148,11 @@ public:
virtual double getPixelScale() const = 0;
virtual double toPixels(double x) const = 0;
virtual void toPixels(double wx, double wy, double &px, double &py) const = 0;
virtual double fromPixels(double x) const = 0;
virtual void fromPixels(double px, double py, double &wx, double &wy) const = 0;
virtual const void *getHandle() const = 0;
virtual bool showMessageBox(MessageBoxType type, const std::string &title, const std::string &message, bool attachtowindow) = 0;