Brad,
Ok, I am using a 2D graphic and rotating it first in the canvas (if that matters). Then I have a method called DrawMyCanvas, g As Graphics, and with g.DrawObject d,67,60 in the code window.
This matches up with my paint event of my canvas that has :
g.DrawObject d,67,60 in it. This serves as the rotaion point of the image so it rotates in its center. In my Print buttons activate event (among setup stuff) I have: DrawMyCanvas(g) and from there I can't seem to control the placement of the image on the printout as I can with text etc...
Make any sense?
Dave


From: Brad Rhine <[EMAIL PROTECTED]>
Reply-To: Getting Started <[email protected]>
To: Getting Started <[email protected]>
Subject: Re: Help with canvas to printer
Date: Thu, 23 Mar 2006 23:23:30 -0500

On Mar 23, 2006, at 11:16 PM, Dave Bert wrote:

I am new to RB so please forgive me for that part :) I have an example that I could send you so we could discuss this better if you don't mind. I can print text and boxes etc just fine but graphics and canvases are totally new to me. My example is a feeble attempt at what I scrounged on the net to make this work and now I am totally confused. Let me know...

Nah, let's do it on the list so that everyone can learn. :)

Let's say we have a window with a canvas. You want to print what's in that canvas. But you can't, but the canvas forgets what it's drawn as soon as it's done. So we need to give the window a property, say something like MyPicture as Picture. Now, wherever you were drawing to the canvas, draw instead to MyPicture.Graphics. Then in the canvas's paint event, you'd put g.DrawPicture MyPicture,0,0 (or something like that; this is from memory). When you're ready to print, you'll get a graphics object from the printer. In that graphics object, write DrawPicture MyPicture,0,0 (just like for the canvas).

I'm not sure I explained that very well. Let me know if I just made things worse. ;)

--
Brad Rhine
[EMAIL PROTECTED]
http://bradrhine.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to