ISpeedometerBackground.ImageDrawStyle

Syntax

ImageDrawStyle: SpeedometerImageDrawStyle;

Description

The ImageDrawStyle property determines a method of image rendering in the background area.

Example

Executing the example requires a form with the Button1 button and the SpeedometerBox component named SpeedometerBox1. The root of disk C contains the Image.bmp file.

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

Var

s: ISpeedometer;

v: ISpeedometerView;

Back: ISpeedometerBackground;

Begin

s := SpeedometerBox1.Speedometer;

v := s.View;

s.BeginUpdate;

Back := v.Background;

Back.Type := SpeedometerBackgroundType.Picture;

Back.Image := GxImage.FromFile("C:\Image.bmp");

Back.ImageDrawStyle := SpeedometerImageDrawStyle.Stretch;

s.EndUpdate;

End Sub Button1OnClick;

After executing the example, on clicking the button, formatting parameters of the speedometer displayed in the SpeedometerBox1 component are changed. The Image.bmp image is set as a speedometer background. The image is stretched to the entire area of the component.

See also:

ISpeedometerBackground