Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.710 Beiträge
 
Delphi 12 Athens
 
#3

AW: FMX.Graphics.TCanvas.FillText drehen

  Alt 3. Sep 2025, 13:54
paar kleine Änderungen ....
Delphi-Quellcode:
uses
  System.Math, System.Math.Vectors; // FMX.Filter.Custom: AffineCreateRotationMatrix

procedure TForm28.FormPaint(Sender: TObject; Canvas: TCanvas; const ARect: TRectF);
var
  Angle: Single;
  R: TRectF;
  Matrix: TMatrix;
begin
  Canvas.Fill.Color := TAlphaColors.Black;
  Angle := -ArcTan2(ClientHeight, ClientWidth); // Calculate angle
  R := ClientRect;
  Matrix := CreateRotationMatrix(Angle);
  Canvas.SetMatrix(Matrix); // Apply the rotation matrix
  Canvas.FillText(R, 'Rotated FMX Text', False, 1, [], TTextAlign.Leading, TTextAlign.Trailing);
end;
aber CreateRotationMatrix gibt es nicht, oder nicht mehr (und AffineCreateRotationMatrix ist wohl was Anderes)

und die Hilfe
https://docwiki.embarcadero.com/Libr...nvas.SetMatrix
Ein Therapeut entspricht 1024 Gigapeut.
  Mit Zitat antworten Zitat