where <THETA> is the Greek capital symbol theta, whose Unicode value is 0x4a.Rotation <THETA> (degrees)
Is there a way of doing this IN CODE?
where <THETA> is the Greek capital symbol theta, whose Unicode value is 0x4a.Rotation <THETA> (degrees)
Code: Select all
procedure TForm1.Chart1AfterDraw(Sender: TObject);
{$IFNDEF CLX}
var UnicodeString : WideString;
{$ENDIF}
begin
inherited;
{$IFNDEF CLX}
SetLength(UnicodeString, 1);
UnicodeString[1] := WideChar($0398);
with Chart1.Canvas.Font do
begin
Size:=15;
Name:='Arial Unicode MS';
end;
SetBkMode(Chart1.Canvas.Handle, TRANSPARENT);
TextOutW(Chart1.Canvas.Handle, 10, 10, PWideChar(UnicodeString),
Length(UnicodeString));
{$ENDIF}
end;
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.Title.Font.Size:=18;
Chart1.Title.Font.Name:='Arial Unicode MS';
Chart1.Title.TextFormat:=ttfHtml;
Chart1.Title.Text.Text:='Theta: ' + WideChar($0398) + '<sub>subscript</sub>' + '<sup>superscript</sup>';
end;
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
In general we need to calculate the text size with a margin.Geocentrix wrote: ↑Mon Mar 16, 2020 12:43 pm
- However, there should be lest space between the end of the regular text and the beginning of the sub/superscript
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |