From: Jeremy White <jez_white@ho...> - 2003-12-23 13:49:47
A couple of months ago I was planning on doing exactly that - I never got
round to doing it, but it is something that I may have to do in the next
couple of months. I use GD to draw my charts, and plot them onto the DC with
Win32::GUI::DIBitmap. There are several different approaches, and I was
going to go for the lazy route:)
I was planning on doing something like this: On the mouse move, a copy of
the original chart would be created. The lines would then be drawn on the
copy, the new image would then be drawn on to the DC. The copying/painting
to the DC are handled by Win32::GUI::DIBitmap. This method isnt exactly
efficient, but would be fast enough for smooth crosshairs as the mouse
pointer moves around. There is a much more efficient approach, but would
involve a little more work:)
Feel free to email me off list if you have any questions.
>From: Jonathan Southwick <jonathan.southwick@...>
>To: Win32-GUI <perl-win32-gui-users@...>
>Subject: [perl-win32-gui-users] need help with Graphic
>Date: Mon, 22 Dec 2003 11:37:15 -0500
>I have a Graphic object that I am plotting data on. While the cursor is on
>this object I have a cross-hairs cursor. What I would like to do is extend
>lines from the cursor position to the edges of the graph (the perimeter)
>but not have them overwrite what is plotted there and as I move the cursor
>around the lines move accordingly.
>It would be the same effect as using a selection tool in any common paint
>I know how to track the current mouse position and i know the values for
>the boundaries of the graph; I just don't know how to produce the effect I
>Has anyone ever accomplished this? Does anyone know HOW to do it? Any
>help would be greatly appreciated.
>Technical & Network Services
>Meadville, PA 16335
>This SF.net email is sponsored by: IBM Linux Tutorials.
>Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
>Free Linux Tutorials. Learn everything from the bash shell to sys admin.
>Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
>Perl-Win32-GUI-Users mailing list
Send a funky Messenger Christmas card http://www.msn.co.uk/christmascard