Autor Beitrag
gasser
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51

W7
Delphi XE
BeitragVerfasst: Mi 10.12.03 16:24 
Hallo

Meine Frage geht schon fast aus dem Titel hervor. Kann man einen Text der in einem Bericht über Printer.Canvas.TextOut ..... ausgegeben wird um 90° drehen? Wenn ja, wie.

mfg
Hanspeter
obbschtkuche
Gast
Erhaltene Danke: 1



BeitragVerfasst: Mi 10.12.03 19:35 
Vielleicht hilft dir ja der Tipp:

www.swissdelphicente.../showcode.php?id=506
chrissivo
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 130

WIN XP, WIN 2000, WIN MCE, WIN 98
D5 Pers
BeitragVerfasst: Mo 28.05.07 11:48 
Hi,
ich habe genau diesen Tipp gesucht und komme aber damit nicht zurande. Bei mir wird lediglich die blaue (auf meinem Drucker: graue) Box gedruckt aber ohne Text drin. Woran kann das liegen?

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
const
   pt8 = -44;
   const1 = 'TEST';

var
   x1,x2,y1,y2 : Integer;
[...]
         Printer.Canvas.Handle := GetWindowDc(Handle);
         try
            GetObject(Font.Handle, SizeOf(LogFont), @LogFont);
            with LogFont do
            begin
               lfEscapement   := 90 * 10;
               lfOrientation  := 90 * 10;
               lfOutPrecision := OUT_TT_ONLY_PRECIS;
               lfFaceName     := 'Arial';
               lfHeight       := pt8;
               lfWeight       := FW_DONTCARE;
               lfQuality      := PROOF_QUALITY;
            end;
            with Printer.Canvas do
            begin
                 Font.Handle := CreateFontIndirect(LogFont);
                 Font.Color  := clWhite;
                 Brush.Color := clNavy;
            end;
            tmpRect := Rect(x1, y1, x2, y2);
            FillRect(tmpRect);
            DrawText(Printer.Canvas.Handle, PChar(const1), -1, tmpRect, DT_BOTTOM or  DT_SINGLELINE);
         finally
         end;
[...]


Für jede Hilfe bin ich dankbar,
bis dann

Chrissi

_________________
"... was ich noch zu sagen hätte dauert eine Zigarette, und ein letztes Glas im Steh'n..."