ISpeedometerCentralShape.Background

Syntax

Background: ISpeedometerBackground;

Description

The Background property determines a background fill of the circle located in the centre of the arrow turn.

Example

Executing the example requires a form with the Button1 button and the SpeedometerBox component named SpeedometerBox1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

s: ISpeedometer;

v: ISpeedometerView;

CentralS: ISpeedometerCentralShape;

CentralSBack: ISpeedometerBackground;

Begin

s := SpeedometerBox1.Speedometer;

v := s.View;

s.BeginUpdate;

CentralS := v.CentralShape;

CentralSBack := CentralS.Background;

CentralSBack.Type := SpeedometerBackgroundType.Gradient;

CentralSBack.Color := GxColor.FromName("Red");

CentralSBack.GradientColor := GxColor.FromName("Green");

CentralS.ShapeOrder := SpeedometerArrowCircleOrder.BelowArrow;

CentralS.Radius := 0.7;

s.EndUpdate;

End Sub Button1OnClick;

After executing the example, on clicking the button, the formatting of the circle located in the centre of the SpeedometerBox1 speedometer component is set. The gradient fill of the background is set for the circle, and the circle is placed behind the speedometer arrow. Radius of the circle equals to 0.7 of speedometer radius.

See also:

ISpeedometerCentralShape