Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Text vertikal zeichnen (https://www.delphipraxis.net/8928-text-vertikal-zeichnen.html)

Tpercon 15. Sep 2003 14:52


Text vertikal zeichnen
 
Auch wenn es hier schonmal einen Beitrag zum Zeichnen in StringGrid's gibt, warum geht folgendes nicht bei nem Image?
Delphi-Quellcode:
    Image1.Canvas.Font.Size := Sign[i].Font.Size;
    Image1.Canvas.Font.Style := Sign[i].Font.Style;
    Image1.Canvas.Font.Name := Sign[i].Font.Name;
    Image1.Canvas.Font.Color := Sign[i].Font.Color;
    if Sign[i].Horizontal = false then begin
      tf:=TFont.Create;
      try
        tf.Assign(Image1.Canvas.Font);
        GetObject(tf.Handle, sizeof(lf), @lf);
        lf.lfEscapement:=900;
        lf.lfOrientation:=0;
        tf.Handle:=CreateFontIndirect(lf);
        Image1.Canvas.Font.Assign(tf);
      finally
        tf.Free;
      end;
    end;
    Image1.Canvas.TextOut(Sign[i].Left, Sign[i].Top, sign_s);
Der Text bleibt ledier Horizontal.

Matze 15. Sep 2003 14:54

Re: Text vertikal zeichnen
 
Was ist denn sign für ein Typ? :gruebel:

Tpercon 15. Sep 2003 15:03

Re: Text vertikal zeichnen
 
Sign ist einfach ein Array.
Was wohl interessanter sein dürfte:
Delphi-Quellcode:
    tf: TFont;
    lf: TLogFont;

Tpercon 15. Sep 2003 20:53

Re: Text vertikal zeichnen
 
Hat denn keiner eine Idee, worin der Fehler liegen könnte?
Kennt jemand eine andere Möglichkeit?

Tpercon 16. Sep 2003 09:44

Re: Text vertikal zeichnen
 
Ich hab's! :hello:
Diese nette Zeile fehlte:
Delphi-Quellcode:
      SetGraphicsMode(Image1.Canvas.Handle, GM_ADVANCED);
Hat jemand eine Idee, wie man ein Rechteck um den Text zeichnet, dass ebenfalls so gedreht wird? Wahrscheinlich nur mit Hilfe vom Polygon?!


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:11 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz