Math
Namespaces
Interfaces
ISize
Properties
height
height: number;
width
width: number;
Functions
alignRectToRect()
function alignRectToRect(
sourceRect,
targetRect,
horizontalAlignment,
verticalAlignment,
): any;
Parameters
| Parameter | Type |
|---|---|
sourceRect | RotatedRectangleF |
targetRect | RotatedRectangleF |
horizontalAlignment | HorizontalOriginPointType |
verticalAlignment | VerticalOriginPointType |
Returns
any
clamp()
function clamp(value, min, max): number;
Clamps a value to a range [min, max].
Parameters
| Parameter | Type | Description |
|---|---|---|
value | number | The value for clamping. |
min | number | The minimum values. If the input value is less than this value, the output will be this value. |
max | number | The maximum value. If the input value is more than this value, the output will be this value. |
Returns
number
fitRectangleToRectangle()
function fitRectangleToRectangle(
fittingRect,
targetRect,
resizeType?,
originX?,
originY?,
): any;
Parameters
| Parameter | Type | Default value |
|---|---|---|
fittingRect | RectangleF | undefined |
targetRect | RectangleF | undefined |
resizeType | any | ResizeRectangleType.Fit |
originX | HorizontalOriginPointType | OriginPointType.Center |
originY | VerticalOriginPointType | OriginPointType.Center |
Returns
any
fitSizeToSize()
function fitSizeToSize(fittingSize, targetSize, resizeType?): ISize;
Parameters
| Parameter | Type | Default value |
|---|---|---|
fittingSize | ISize | undefined |
targetSize | ISize | undefined |
resizeType | any | ResizeRectangleType.Fit |
Returns
getOriginCoordinate()
function getOriginCoordinate(rect, originX, originY): any;
Parameters
| Parameter | Type |
|---|---|
rect | RectangleF |
originX | OriginPointType |
originY | OriginPointType |
Returns
any
getRectPoint()
function getRectPoint(rect, horizontal, vertical): any;
Parameters
| Parameter | Type |
|---|---|
rect | RotatedRectangleF |
horizontal | HorizontalOriginPointType |
vertical | VerticalOriginPointType |
Returns
any
getResizedImageAxisDpi()
function getResizedImageAxisDpi(sourceSize, sourceDpi, targetSize): number;
Parameters
| Parameter | Type |
|---|---|
sourceSize | number |
sourceDpi | number |
targetSize | number |
Returns
number
getResizedImageMinAxisDpi()
function getResizedImageMinAxisDpi(
sourceWidth,
sourceHeight,
sourceDpiX,
sourceDpiY,
targetWidth,
targetHeight,
): number;
Parameters
| Parameter | Type |
|---|---|
sourceWidth | number |
sourceHeight | number |
sourceDpiX | number |
sourceDpiY | number |
targetWidth | number |
targetHeight | number |
Returns
number
getRotatedRectangleWithBorder()
function getRotatedRectangleWithBorder(rectangle, border): any;
Parameters
| Parameter | Type |
|---|---|
rectangle | RotatedRectangleF |
border | ILtrb |
Returns
any
getTranslationTransform()
function getTranslationTransform(source, target): Transform;
Parameters
| Parameter | Type |
|---|---|
source | PointF |
target | PointF |
Returns
Transform
mapToRange()
function mapToRange(value, oldMin, oldMax, newMin, newMax): number;
Maps the given value from the range [oldMin, oldMax] to the range [newMin, newMax]. Where each min is less than corresponding max.
Parameters
| Parameter | Type | Description |
|---|---|---|
value | number | The value to map. |
oldMin | number | The minimum value of the old range. Must be less than oldMax. |
oldMax | number | The maximum value of the old range. Must be greater than oldMin. |
newMin | number | The minimum value of the new range. Must be less than newMax. |
newMax | number | The maximum value of the new range. Must be greater than newMin. |
Returns
number
minByAbs()
function minByAbs(...values): number;
Parameters
| Parameter | Type |
|---|---|
...values | number[] |
Returns
number
rectangleEquals()
function rectangleEquals(rec1, rec2, tolerance?): any;
Parameters
| Parameter | Type |
|---|---|
rec1 | RectangleF |
rec2 | RectangleF |
tolerance? | number |
Returns
any
snapValueToStep()
function snapValueToStep(oldVal, newVal, step): number;
Parameters
| Parameter | Type |
|---|---|
oldVal | number |
newVal | number |
step | number |
Returns
number