TdxScaleFactor.Revert(TSize) Method
Applies the inverted current scaling factor to the specified value.
Declaration
function Revert(const V: TSize): TSize; overload;
Parameters
Name | Type |
---|---|
V | TSize |
Returns
Type |
---|
TSize |
Remarks
Call this function to multiply and divide a value passed as the V parameter, by the Denominator and Numerator property values, respectively. The different overloaded Revert function variants allow you to apply the inverted scaling factor to different value types:
Overloaded Variant | Description |
---|---|
1 | Multiplies the denominator by the specified integer value and divides the product by the numerator rounding the returned value to the nearest integer. |
2 | Multiplies both the X and Y fields of the specified TPoint record by the denominator and then divides each product by the numerator rounding the returned record’s both field values to the nearest integer. |
3 | Multiplies the Left, Top, Right, and Bottom fields of the specified TRect record by the denominator and then divides each product by the numerator rounding the returned record’s field values to the nearest integer. |
4 | Multiplies both the cx and cy fields of the specified TSize record by the denominator and then divides each product by the numerator rounding the returned record’s both field values to the nearest integer. |
5 | This function variant, named RevertF, due to C++Builder compiler limitations, multiplies the denominator by the specified floating-point value and divides the product by the numerator. Unlike the other overloaded function variants, RevertF does not round the returned value. |
Call the corresponding overloaded Apply function variant to perform the reverse operation.
Note
The Revert function returns the specified value as is if the Assigned property returns False.
See Also