DX9ToolsR4 - Created by: X

GeneralHelpers.UVFromRectangle Method (Size, Single, Single, Single, Single)

Converts a rectangle into an array of 4 texture coordanants.

[Visual Basic]
Overloads Public Shared Function UVFromRectangle( _
   ByVal ImageSize As Size, _
   ByVal Left As Single, _
   ByVal Top As Single, _
   ByVal Right As Single, _
   ByVal Bottom As Single _
) As Vector2()
[C#]
public static Vector2[] UVFromRectangle(
   Size ImageSize,
   float Left,
   float Top,
   float Right,
   float Bottom
);

Parameters

ImageSize
The size 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