Show / Hide Table of Contents

Method Coord.NormalizeInRect


Overload

Converts fractional/reverse coordinates to normal coordinates in a rectangle.

public static POINT NormalizeInRect(Coord x, Coord y, RECT r, bool widthHeight = false, bool centerIfEmpty = false)
Parameters
x  (Coord)

X coordinate relative to r.

y  (Coord)

Y coordinate relative to r.

r  (RECT)

The rectangle.

widthHeight  (bool)

Use only width and height of r. If false (default), the function adds r offset (left and top).

centerIfEmpty  (bool)

If x or y is default, use Coord.Center. Not used with widthHeight.

Returns
POINT