class EE::Graphics::PixelDensity¶
#include <pixeldensity.hpp> class PixelDensity { public: // methods static Float toFloat(PixelDensitySize pd); static Float toFloat(Uint32 pd); static PixelDensitySize fromString(std::string str); static PixelDensitySize fromString(String str); static PixelDensitySize fromDPI(Float dpi); static const Float& getPixelDensity(); static void setPixelDensity(const Float& pixelDensity); static void setPixelDensity(const PixelDensitySize& pixelDensity); static Float pxToDp(Float px); static Int32 pxToDpI(Float px); static Float dpToPx(Float dp); static Int32 dpToPxI(Float dp); static Sizei dpToPxI(Sizei size); static Sizei pxToDpI(Sizei size); static Rect dpToPxI(Rect size); static Rect pxToDpI(Rect size); static Rectf dpToPx(Rectf size); static Rectf pxToDp(Rectf size); static Sizef dpToPx(Sizef size); static Sizef pxToDp(Sizef size); static Sizei dpToPxI(Sizef size); static Sizei pxToDpI(Sizef size); static Vector2i dpToPxI(Vector2i pos); static Vector2i pxToDpI(Vector2i pos); static Vector2f dpToPx(Vector2f pos); static Vector2f pxToDp(Vector2f pos); static Float toDpFromString(const std::string& str); static Float toDpFromStringI(const std::string& str); };