Autor Beitrag
Der Jan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98

Win2k prof, WinXP prof, Linux
D6 Prof, BCB4 Std, BCB6 Ent, BDS 2006 Ent
BeitragVerfasst: Mo 24.10.05 11:25 
Hallo,

ich möchte eine Grafik (TBitmap) drucken und zwar seitenfüllend.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
procedure TIFF2Printer(i_sFile: string);
var
  bmp: TBitmap;
begin
  try
    bmp := TIFF2Bitmap(i_sFile);  //Bild laden
    with Printer do begin
      BeginDoc;
      Canvas.StretchDraw((Rect(200, 200, PageWidth - 200, PageHeight - 200), bmp);
      EndDoc;
    end;
    bmp.Destroy;
  except
    raise;
  end;
end;


Nur das Bild erscheint winzigklein in der linken oberen Ecke des Blattes :(
Was mach ich da falsch?
Übrigens Pagewidth/PageHeight = 4662/6764.

_________________
Gruß, Jan
ebs
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 213

Suse Linux 9.2, Win 98, Win NT, Win XP, Win for Workgroups, Win XP SP2, Dos 6.1
D3 Prof, D2005 PE, Delphi 2006 Prof.
BeitragVerfasst: Mi 02.11.05 16:51 
Funktioniert denn diese komische Tiff2Bitmap Methode denn einwandfrei?
Der Jan Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98

Win2k prof, WinXP prof, Linux
D6 Prof, BCB4 Std, BCB6 Ent, BDS 2006 Ent
BeitragVerfasst: Do 03.11.05 12:29 
Sorry, hätte wohl reinschreiben sollen, das es mittlerweile funktioniert. :roll: Ich hatte nur die falsche Funktion geändert bzw. die nicht geänderte Funktion aufgerufen. D.h. so wie im Source gepostet geht es.