Holds the ratio of 2 positive integers in the form of \((n:m)\).
More...
Inherits global.SystemIDisposable.
|
|
| Ratio (global::System.IntPtr cPtr, bool cMemoryOwn) |
| |
|
void | Dispose () |
| |
| | Ratio () |
| | Default constructor. Initializes with ratio \((1:1)\).
|
| |
| | Ratio (uint theNumerator, uint theDenominator) |
| | Constructor.
|
| |
| uint | Numerator () |
| | Returns the numerator of the ratio (i.e. \(n\) from \((n:m)\)).
|
| |
| void | SetNumerator (uint theNumerator) |
| | Sets the numerator of the ratio (i.e.
|
| |
| uint | Denominator () |
| | Returns the denominator of the ratio (i.e. \(m\) from \((n:m)\)).
|
| |
| void | SetDenominator (uint theDenominator) |
| | Sets the denominator of the ratio (i.e.
|
| |
| double | ToDouble () |
| | Converts the ratio to double floating-point number.
|
| |
|
bool | IsEqual (cadex.Drawing.Ratio theOther) |
| |
|
bool | IsNotEqual (cadex.Drawing.Ratio theOther) |
| |
|
|
virtual void | Dispose (bool disposing) |
| |
Holds the ratio of 2 positive integers in the form of \((n:m)\).
Can be used to define the scale factor in certain situations. The numerator and denominator are not reduced, they are stored as is.
- See also
- View.Scale()
◆ Ratio() [1/2]
| cadex.Drawing.Ratio.Ratio |
( |
| ) |
|
|
inline |
Default constructor. Initializes with ratio \((1:1)\).
◆ Ratio() [2/2]
| cadex.Drawing.Ratio.Ratio |
( |
uint | theNumerator, |
|
|
uint | theDenominator ) |
|
inline |
Constructor.
Initializes with user-defined ratio.
- Warning
- 0 does not make sense for and should not be passed to either of the parameters.
◆ Denominator()
| uint cadex.Drawing.Ratio.Denominator |
( |
| ) |
|
|
inline |
Returns the denominator of the ratio (i.e. \(m\) from \((n:m)\)).
◆ Numerator()
| uint cadex.Drawing.Ratio.Numerator |
( |
| ) |
|
|
inline |
Returns the numerator of the ratio (i.e. \(n\) from \((n:m)\)).
◆ SetDenominator()
| void cadex.Drawing.Ratio.SetDenominator |
( |
uint | theDenominator | ) |
|
|
inline |
Sets the denominator of the ratio (i.e.
\(m\) from \((n:m)\)).
- Warning
- 0 does not make sense for and should not be supplied to this parameter.
◆ SetNumerator()
| void cadex.Drawing.Ratio.SetNumerator |
( |
uint | theNumerator | ) |
|
|
inline |
Sets the numerator of the ratio (i.e.
\(n\) from \((n:m)\)).
- Warning
- 0 does not make sense for and should not be supplied to this parameter.
◆ ToDouble()
| double cadex.Drawing.Ratio.ToDouble |
( |
| ) |
|
|
inline |
Converts the ratio to double floating-point number.