Cheers. I reworked the CustomForm.Print procedure and that works quite well.
It pretty much does what you suggest, using StretchDIBits.

-----Original Message-----
From: Corey Murtagh [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, 11 September 2001 10:33
To: Multiple recipients of list delphi
Subject: Re: [DUG]: DIBs et al


----- Original Message -----
From: "James Sugrue" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Monday, September 10, 2001 3:08 PM
Subject: [DUG]: DIBs et al


> What is the easiest way to get a Bitmap in a TImage to print the same 
> size as it is on screen? I tried passing it to a TMetaCanvas but I 
> must have
been
> doing something wrong as it printed very small.

The size that the bitmap will print is dependant largely on the DPI setting
of the printer.  If you have a 300x300 pixel bitmap, and a 300DPI printer,
then expect a 1-inch square output image.  You should be able to fix this by
upping the image size by stretching it when you draw to the printer canvas.
Exactly how much you stretch will depend on the printer settings.  If it's
300DPI then you might want to stretch it by (using standard screen
resolution of 96DPI) 300/96 = 3.125.  So your 300x300 pixel image is
stretched to 938x938 - or 3.125 inches square.

--
Corey Murtagh
The Electric Monk
"Quidquid latine dictum sit, altum viditur."

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to