Board index » delphi » can I copy form canvas to printer canvas ???

can I copy form canvas to printer canvas ???

can I move/copy form canvas to printer canvas

If I can
how can I do ?????

technos...@superonline.com

 

Re:can I copy form canvas to printer canvas ???


Quote
ilker tiryaki wrote:
> can I move/copy form canvas to printer canvas

> If I can
> how can I do ?????

> technos...@superonline.com

   I am not sure what you are asking, but if it is what I think it is,

In your subroutine which draws to the form canvas, pass the canvas as
parameter

eg: Procedure DrawTo( TargetCanvas : TCanvas);

          TargetCanvas.MoveTo(0,0);
          TargetCanvas.LineTo(100,100);

    end;

then you can use the same routine to draw to the form canvas and the
printer canvas..

eg: DrawTo(printer.canvas)  or DrawTo(myForm.Canvas)

Hope it helps...

Re:can I copy form canvas to printer canvas ???


Though I never tried it, printer.canvas.copyrect() should do the job.
I prefer the form.print way. There you need a big enough screen,
otherwise it's clipped.

Rene

Quote
ilker tiryaki wrote:

> can I move/copy form canvas to printer canvas

> If I can
> how can I do ?????

> technos...@superonline.com

Re:can I copy form canvas to printer canvas ???


On Mon, 29 Dec 1997 21:56:11 -0000, "ilker tiryaki"

Quote
<technos...@superonline.com> wrote:
>can I move/copy form canvas to printer canvas

You can, but the results generally won't be very satisfactory.
Instead, you should use StretchDIBits to copy a bitmap from a screen
canvas to a printer canvas. There is an example of this in the
MANUALS.TXT file that comes with Delphi 1.0 (it's on the CD if you're
using Delphi 2.0 or 3.0).

-Steve

Other Threads