DX9ToolsR4 - Created by: X

GeneralHelpers.UVFromRectangle Method (Size, Point, Size)

Converts a rectangle into an array of 4 texture coordanants.

[Visual Basic]
Overloads Public Shared Function UVFromRectangle( _
   ByVal ImageSize As Size, _
   ByVal Location As Point, _
   ByVal Size As Size _
) As Vector2()
[C#]
public static Vector2[] UVFromRectangle(
   Size ImageSize,
   Point Location,
   Size Size
);

Parameters

ImageSize
The size of the image.
Location
The location representing the top left of the source rectangle to convert.
Size
The location representing the size of the source rectangle to convert.

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