Crazy Eddies GUI System  0.7.2
Static Public Member Functions | List of all members
CEGUI::CoordConverter Class Reference

Utility class that helps in converting various types of co-ordinate between absolute screen positions and positions offset from the top-left corner of a given Window object. More...

Static Public Member Functions

static float windowToScreenX (const Window &window, const UDim &x)
 Convert a window co-ordinate value, specified as a UDim, to a screen relative pixel co-ordinate. More...
 
static float windowToScreenX (const Window &window, const float x)
 Convert a window pixel co-ordinate value, specified as a float, to a screen pixel co-ordinate. More...
 
static float windowToScreenY (const Window &window, const UDim &y)
 Convert a window co-ordinate value, specified as a UDim, to a screen relative pixel co-ordinate. More...
 
static float windowToScreenY (const Window &window, const float y)
 Convert a window pixel co-ordinate value, specified as a float, to a screen pixel co-ordinate. More...
 
static Vector2 windowToScreen (const Window &window, const UVector2 &vec)
 Convert a window co-ordinate point, specified as a UVector2, to a screen relative pixel co-ordinate point. More...
 
static Vector2 windowToScreen (const Window &window, const Vector2 &vec)
 Convert a window pixel co-ordinate point, specified as a Vector2, to a screen pixel co-ordinate point. More...
 
static Rect windowToScreen (const Window &window, const URect &rect)
 Convert a window area, specified as a URect, to a screen area. More...
 
static Rect windowToScreen (const Window &window, const Rect &rect)
 Convert a pixel window area, specified as a Rect, to a screen area. More...
 
static float screenToWindowX (const Window &window, const UDim &x)
 Convert a screen relative UDim co-ordinate value to a window co-ordinate value, specified in pixels. More...
 
static float screenToWindowX (const Window &window, const float x)
 Convert a screen pixel co-ordinate value to a window co-ordinate value, specified in pixels. More...
 
static float screenToWindowY (const Window &window, const UDim &y)
 Convert a screen relative UDim co-ordinate value to a window co-ordinate value, specified in pixels. More...
 
static float screenToWindowY (const Window &window, const float y)
 Convert a screen pixel co-ordinate value to a window co-ordinate value, specified in pixels. More...
 
static Vector2 screenToWindow (const Window &window, const UVector2 &vec)
 Convert a screen relative UVector2 point to a window co-ordinate point, specified in pixels. More...
 
static Vector2 screenToWindow (const Window &window, const Vector2 &vec)
 Convert a screen Vector2 pixel point to a window co-ordinate point, specified in pixels. More...
 
static Rect screenToWindow (const Window &window, const URect &rect)
 Convert a URect screen area to a window area, specified in pixels. More...
 
static Rect screenToWindow (const Window &window, const Rect &rect)
 Convert a Rect screen pixel area to a window area, specified in pixels. More...
 

Detailed Description

Utility class that helps in converting various types of co-ordinate between absolute screen positions and positions offset from the top-left corner of a given Window object.

Member Function Documentation

static Vector2 CEGUI::CoordConverter::screenToWindow ( const Window window,
const UVector2 vec 
)
static

Convert a screen relative UVector2 point to a window co-ordinate point, specified in pixels.

Parameters
windowWindow object to use as a target for the conversion.
vecUVector2 object describing the point to be converted
Returns
Vector2 object describing a window co-ordinate point that is equivalent to screen based UVector2 point vec.
static Vector2 CEGUI::CoordConverter::screenToWindow ( const Window window,
const Vector2 vec 
)
static

Convert a screen Vector2 pixel point to a window co-ordinate point, specified in pixels.

Parameters
windowWindow object to use as a target for the conversion.
vecVector2 object describing the point to be converted.
Returns
Vector2 object describing a window co-ordinate point that is equivalent to screen based Vector2 point vec.
static Rect CEGUI::CoordConverter::screenToWindow ( const Window window,
const URect rect 
)
static

Convert a URect screen area to a window area, specified in pixels.

Parameters
windowWindow object to use as a target for the conversion.
rectURect object describing the area to be converted
Returns
Rect object describing a window area that is equivalent to URect screen area rect.
static Rect CEGUI::CoordConverter::screenToWindow ( const Window window,
const Rect rect 
)
static

Convert a Rect screen pixel area to a window area, specified in pixels.

Parameters
windowWindow object to use as a target for the conversion.
rectRect object describing the area to be converted.
Returns
Rect object describing a window area that is equivalent to Rect screen area rect.
static float CEGUI::CoordConverter::screenToWindowX ( const Window window,
const UDim x 
)
static

Convert a screen relative UDim co-ordinate value to a window co-ordinate value, specified in pixels.

Parameters
windowWindow object to use as a target for the conversion.
xUDim x co-ordinate value to be converted
Returns
float value describing a window co-ordinate value that is equivalent to screen UDim co-ordinate x.
static float CEGUI::CoordConverter::screenToWindowX ( const Window window,
const float  x 
)
static

Convert a screen pixel co-ordinate value to a window co-ordinate value, specified in pixels.

Parameters
windowWindow object to use as a target for the conversion.
xfloat x co-ordinate value to be converted.
Returns
float value describing a window co-ordinate value that is equivalent to screen co-ordinate x.
static float CEGUI::CoordConverter::screenToWindowY ( const Window window,
const UDim y 
)
static

Convert a screen relative UDim co-ordinate value to a window co-ordinate value, specified in pixels.

Parameters
windowWindow object to use as a target for the conversion.
yUDim y co-ordinate value to be converted
Returns
float value describing a window co-ordinate value that is equivalent to screen UDim co-ordinate y.
static float CEGUI::CoordConverter::screenToWindowY ( const Window window,
const float  y 
)
static

Convert a screen pixel co-ordinate value to a window co-ordinate value, specified in pixels.

Parameters
windowWindow object to use as a target for the conversion.
yUDim y co-ordinate value to be converted.
Returns
float value describing a window co-ordinate value that is equivalent to screen co-ordinate y.
static Vector2 CEGUI::CoordConverter::windowToScreen ( const Window window,
const UVector2 vec 
)
static

Convert a window co-ordinate point, specified as a UVector2, to a screen relative pixel co-ordinate point.

Parameters
windowWindow object to use as a base for the conversion.
vecUVector2 object describing the point to be converted
Returns
Vector2 object describing a screen co-ordinate position that is equivalent to window based UVector2 vec.
static Vector2 CEGUI::CoordConverter::windowToScreen ( const Window window,
const Vector2 vec 
)
static

Convert a window pixel co-ordinate point, specified as a Vector2, to a screen pixel co-ordinate point.

Parameters
windowWindow object to use as a base for the conversion.
vecVector2 object describing the point to be converted.
Returns
Vector2 object describing a screen co-ordinate position that is equivalent to window based Vector2 vec.
static Rect CEGUI::CoordConverter::windowToScreen ( const Window window,
const URect rect 
)
static

Convert a window area, specified as a URect, to a screen area.

Parameters
rectURect object describing the area to be converted
Returns
Rect object describing a screen area that is equivalent to window area rect.
static Rect CEGUI::CoordConverter::windowToScreen ( const Window window,
const Rect rect 
)
static

Convert a pixel window area, specified as a Rect, to a screen area.

Parameters
windowWindow object to use as a base for the conversion.
rectRect object describing the area to be converted.
Returns
Rect object describing a screen area that is equivalent to window area rect.
static float CEGUI::CoordConverter::windowToScreenX ( const Window window,
const UDim x 
)
static

Convert a window co-ordinate value, specified as a UDim, to a screen relative pixel co-ordinate.

Parameters
windowWindow object to use as a base for the conversion.
xUDim x co-ordinate value to be converted
Returns
float value describing a pixel screen co-ordinate that is equivalent to window UDim co-ordinate x.
static float CEGUI::CoordConverter::windowToScreenX ( const Window window,
const float  x 
)
static

Convert a window pixel co-ordinate value, specified as a float, to a screen pixel co-ordinate.

Parameters
windowWindow object to use as a base for the conversion.
xfloat x co-ordinate value to be converted.
Returns
float value describing a pixel screen co-ordinate that is equivalent to window co-ordinate x.
static float CEGUI::CoordConverter::windowToScreenY ( const Window window,
const UDim y 
)
static

Convert a window co-ordinate value, specified as a UDim, to a screen relative pixel co-ordinate.

Parameters
windowWindow object to use as a base for the conversion.
yUDim y co-ordinate value to be converted
Returns
float value describing a screen co-ordinate that is equivalent to window UDim co-ordinate y.
static float CEGUI::CoordConverter::windowToScreenY ( const Window window,
const float  y 
)
static

Convert a window pixel co-ordinate value, specified as a float, to a screen pixel co-ordinate.

Parameters
windowWindow object to use as a base for the conversion.
yfloat y co-ordinate value to be converted.
Returns
float value describing a screen co-ordinate that is equivalent to window co-ordinate y.