coordconverter.pkg

来自「cegui界面库」· PKG 代码 · 共 31 行

PKG
31
字号
/***********************************************************************
    CoordConverter utility class
***********************************************************************/
class CoordConverter
{
    static float windowToScreenX(const Window& window, const UDim& x);
    static float windowToScreenX(const Window& window, const float x);

    static float windowToScreenY(const Window& window, const UDim& y);
    static float windowToScreenY(const Window& window, const float y);

    static Vector2 windowToScreen(const Window& window, const UVector2& vec);
    static Vector2 windowToScreen(const Window& window, const Vector2& vec);

    static Rect windowToScreen(const Window& window, const URect& rect);
    static Rect windowToScreen(const Window& window, const Rect& rect);

    static float screenToWindowX(const Window& window, const UDim& x);
    static float screenToWindowX(const Window& window, const float x);

    static float screenToWindowY(const Window& window, const UDim& y);
    static float screenToWindowY(const Window& window, const float y);

    static Vector2 screenToWindow(const Window& window, const UVector2& vec);
    static Vector2 screenToWindow(const Window& window, const Vector2& vec);

    static Rect screenToWindow(const Window& window, const URect& rect);
    static Rect screenToWindow(const Window& window, const Rect& rect);

};

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?