Hi,

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 isn’t 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 <[EMAIL PROTECTED]>
To: Win32-GUI <perl-win32-gui-users@lists.sourceforge.net>
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 program.

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 am wanting.

Has anyone ever accomplished this? Does anyone know HOW to do it? Any help would be greatly appreciated.

Jonathan
========================
Jonathan Southwick
[EMAIL PROTECTED]
Technical & Network Services
Allegheny College
Meadville, PA 16335
(814) 332-2755



-------------------------------------------------------
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
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users

_________________________________________________________________
Send a funky Messenger Christmas card http://www.msn.co.uk/christmascard


Reply via email to