Sorry about the lack of quoting... stupid email program doesn't handle
quoting HTML posts (time for a change), but...
In your example code you create a TImage, but don't give it a size.
Have you tried copying it to a on-screen canvas to see what it looks
like? I suspect that it's got no height or width, so when you copy it
to the printer canvas there is (understandably) nothing to copy.
Try:
drawbfr := TBitmap.Create(Application)
drawbfr.PixelFormat := pf1bit;
drawbfr.Height := 10000;
drawbfr.Width := 10000;
try
SourceRect := Rect(0, 0, 10000, 10000)
drawbfr.Canvas.Rectangle(1, 1, 200, 200);
Canvas.CopyMode := cmSrcCopy
Canvas.CopyRect(SourceRect, drawbfr.Canvas, SourceRect);
finally
drawbfr.Free;
end;
You can assign the bitmap to the TImage if you prefer, or try resizing
Image.Picture, but it seems to me that TImage has lots of overhead that
you don't need in this instance. The worst part about this whole thing
is that in the example above drawbfr will have a total of 100000000
pixels occupying around 1.25MB of memory, and copying the whole thing
to the printer canvas could cause you some major headaches. Not to
mention the fact that many video drivers have issues with huge bitmaps,
and aren't particularly well known for handling huge CopyRect
operations smoothly.
All in all I think though that it's a better idea to draw direct to the
printer. Less memory required, you can take advantage of the printer's
own drawing commands (esp. handy for PostScript printers), and you
avoid the majority of video-driver related issues.
--
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"