DX9ToolsR4 - Created by: X

GeneralHelpers.UVFromRectangle Method (Int32, Int32, Int32, Int32, Int32, Int32)

Converts a rectangle into an array of 4 texture coordanants.

[Visual Basic]
Overloads Public Shared Function UVFromRectangle( _
   ByVal ImageWidth As Integer, _
   ByVal ImageHeight As Integer, _
   ByVal Left As Integer, _
   ByVal Top As Integer, _
   ByVal Right As Integer, _
   ByVal Bottom As Integer _
) As Vector2()
[C#]
public static Vector2[] UVFromRectangle(
   int ImageWidth,
   int ImageHeight,
   int Left,
   int Top,
   int Right,
   int Bottom
);

Parameters

ImageWidth
The width of the image.
ImageHeight
The height of the image.
Left
The left location inside the image.
Top
The top location inside the image.
Right
The right location inside the image.
Bottom
The bottom location inside the image.

Return Value

Returns an array of 4 Vector2 types representing the converted values.

See Also

GeneralHelpers Class | CBX.Libs.DX9ToolsR4 Namespace | GeneralHelpers.UVFromRectangle Overload List