Back to Devexpress

TdxScaleFactor Class

vcl-cxgeometry-741a5b22.md

latest3.5 KB
Original Source

TdxScaleFactor Class

Stores a scale factor for visual elements.

Declaration

delphi
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

DenominatorReturns the scale factor’s denominator.NumeratorReturns the scale factor’s numerator.

Geometry Scale Operations

ApplyScales specified integer-based (pixel) dimensions according to current numerator and denominator values.ApplyFScales specified floating-point dimensions according to current numerator and denominator values.ChangeMultiplies stored numerator and denominator by specified values.RevertApplies the reverted scale factor to specified integer-based (pixel) dimensions.RevertFApplies the reverted scale factor to specified floating-point dimensions.

General-Purpose API Members

AssignAssigns new numerator and denominator values.AssignedAllows you to identify if the scale factor corresponds to unscaled geometry (at 96 DPI).EqualsCompares two scale factors.ListenerAdd | ListenerRemoveManage the list of objects that track scale factor changes.

Direct TdxScaleFactor Class References

The following API members reference a TdxScaleFactor object:

TcxScalableComponent.ScaleFactorReturns the component’s scale factor.TdxForm.ScaleFactorReturns the form’s scale factor.TdxCustomForm.ScaleFactorReturns the form’s scale factor.

Inheritance

TObject TdxScaleFactor

See Also

IdxScaleFactor Interface

TdxScaleFactor Members

cxGeometry Unit