Skip to main content

TdxScaleFactor Class

Stores a scale factor for visual elements.

Declaration

TdxScaleFactor = class(
    TObject
)

Remarks

DevExpress controls use a scale factor to calculate pixel dimensions of DPI-aware forms and visual elements. A scale factor consists of integer numerator and denominator values stored in a TdxScaleFactor instance. The TdxScaleFactor class also implements multiple auxiliary methods that scale geometry.

Main API Members

The list below outlines key members of the TdxScaleFactor class. These members allow you to change the stored scale factor and scale geometry according to the required numerator and denominator values.

Scale Factor

Denominator
Returns the scale factor’s denominator.
Numerator
Returns the scale factor’s numerator.

Geometry Scale Operations

Apply
Scales specified integer-based (pixel) dimensions according to current numerator and denominator values.
ApplyF
Scales specified floating-point dimensions according to current numerator and denominator values.
Change
Multiplies stored numerator and denominator by specified values.
Revert
Applies the reverted scale factor to specified integer-based (pixel) dimensions.
RevertF
Applies the reverted scale factor to specified floating-point dimensions.

General-Purpose API Members

Assign
Assigns new numerator and denominator values.
Assigned
Allows you to identify if the scale factor corresponds to unscaled geometry (at 96 DPI).
Equals
Compares two scale factors.
ListenerAdd | ListenerRemove
Manage the list of objects that track scale factor changes.

Direct TdxScaleFactor Class References

The following API members reference a TdxScaleFactor object:

TcxScalableComponent.ScaleFactor
Returns the component’s scale factor.
TdxForm.ScaleFactor
Returns the form’s scale factor.
TdxCustomForm.ScaleFactor
Returns the form’s scale factor.

Inheritance

TObject
TdxScaleFactor
See Also