Skip to main content

TdxGaugeCustomCaptionOptionsLayout.CenterPositionFactorX Property

Specifies the relative horizontal position of the custom inscription within a scale.

Declaration

property CenterPositionFactorX: Single read; write;

Property Value

Type
Single

Remarks

The CenterPositionFactorX and CenterPositionFactorY properties are used collectively to specify the custom label’s position within the scale’s boundaries. The distance between the center of the custom inscription’s bounding box and the scale’s left border is the result of multiplying the CenterPositionFactorX property value by the scale’s width.

Negative values of the CenterPositionFactorX and CenterPositionFactorY properties are valid as well. The negative value of the CenterPositionFactorX property specifies how far the center of the custom inscription’s bounding box is shifted to the left of the scale’s left border. The actual distance between the center of the label’s bounding box and the scale’s left border is calculated in the same manner as if the CenterPositionFactorX property value was positive.

If either of the scale’s boundaries match the Gauge Control‘s bounds or the CenterPositionFactorX property is low enough, the custom label can be shifted beyond the visible area.

The values of the CenterPositionFactorX and CenterPositionFactorY properties can exceed 1. The CenterPositionFactorX property values beyond 1 specify how far the center of the custom label’s bounding box is shifted to the right of the scale’s right border, possibly beyond the visible area. The actual difference between the center of the custom inscription’s bounding box and the scale’s right border is calculated in the same manner as if the CenterPositionFactorX property value was within range between 0 and 1.

If the CenterPositionFactorX property is set to 0 or 1, the center of the custom label’s bounding box is located on the scale’s left or right border, respectively.

See Also