Sign in Join
Wiki copytemporary

turn writing/de: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: turn writing/de

OldNewLine
1+Zurück zur Seite [[code examples/de|Code Beispiele]].
2+
3+Dieser Artikel beschäftigt sich mit der Windowsprogrammierung.
4+
5+Die Prozedur dreht im übergebenen Canvas-Objekt den übergebenen Schriftzug.
6+
7+``` pascal
8+uses
9+ Graphics, Windows, ...;
10+
11+ ...
12+
13+{Übergabeparameter:
14+ Canvas-Objekt
15+ X-Position
16+ Y-Position
17+ zu verwendender Winkel}
18+
19+procedure subSchriftDrehen(C: TCanvas; wrdX, wrdY: word; intWinkel: integer;
20+ strText: WideString);
21+
22+var
23+ LogRec: TLOGFONT;
24+
25+begin
26+ try
27+ GetObject(C.Font.Handle, SizeOf(LogRec), Addr(LogRec));
28+ LogRec.lfEscapement := Trunc(intWinkel * 10);
29+ C.Font.Handle := CreateFontIndirect(LogRec);
30+ C.TextOut(wrdX, wrdY, strText);
31+ finally;
32+ DeleteObject(C.Font.Handle);
33+ end;
34+end;
35+
36+ ...
37+
38+```
39+
40+Beispiel für einen Aufruf der Prozedur:
41+
42+``` pascal
43+ ...
44+subSchriftDrehen(Form1.Canvas, 30, 90, 40, 'Test');
45+ ...
46+```
47+
48+---
49+*From the Free Pascal wiki, page "turn writing/de", as it stood on 2020-03-02 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history