Defines the shape to use as a decoration for the instrument. The decoration can be pre-defined paths or a custom path. Use
DecorationFillColor and
DecorationStrokeColor to customize the colors of the decoration.
Namespace: RS.Impact.Instruments
Delphi
|
public
property Decoration: TDecoration read FDecoration write SetDecoration default dcNone;
|
Property Value
Type: TDecoration
The following code changes the decoration and color for the analog calendar based on the season of the year:
Delphi
|
procedure TfrmDashboard.RSAnalogCalendar1Change(Sender: TObject);
const
// day of year approximate for other years
Spring = 80;
Summer = 172;
Autumn = 266;
Winter = 356;
begin
// Spring := DayOfTheYear(StrToDate('3/20/2016'));
// Summer := DayOfTheYear(StrToDate('6/20/2016'));
// Autumn := DayOfTheYear(StrToDate('9/22/2016'));
// Winter := DayOfTheYear(StrToDate('12/21/2016'));
case (Sender as TRSAnalogCalendar).DayOfYear of
Spring..Summer-1:
begin
TRSAnalogCalendar(Sender).Decoration := dcSpring;
TRSAnalogCalendar(Sender).DecorationFillColor := TSVGColorRec.Springgreen;
end;
Summer..Autumn-1:
begin
TRSAnalogCalendar(Sender).Decoration := dcSummer;
TRSAnalogCalendar(Sender).DecorationFillColor := TSVGColorRec.Yellow;
end;
Autumn..Winter-1:
begin
TRSAnalogCalendar(Sender).Decoration := dcAutumn;
TRSAnalogCalendar(Sender).DecorationFillColor := TSVGColorRec.Orangered;
end;
else
TRSAnalogCalendar(Sender).Decoration := dcWinter;
TRSAnalogCalendar(Sender).DecorationFillColor := TSVGColorRec.White;
end;
end;
|
|