TImage: Top,Left = 0, AutoSize = True
TForm: AutoSize = True, AutoScroll = False
Formulár sa prispôsobí obrázku !
Tlačiť TImage vieš ?
uses
printers;
procedure TForm1.Button1Click(Sender: TObject);
var ScaleX, ScaleY :Integer;
RR :TRect;
begin
with Printer do
begin
BeginDoc;
try
ScaleX := GetDeviceCaps(Handle,logPixelsX) div PixelsPerInch;
ScaleY := GetDeviceCaps(Handle,logPixelsY) div PixelsPerInch;
RR := Rect(0,0,Image1.picture.width * scaleX, Image1.Picture.Height * ScaleY);
Canvas.StretchDraw(RR,Image1.Picture.Graphic);
finally
EndDoc;
end;
end;
end;