Solved

VB.Net Graphics Question DrawPie

Posted on 2009-07-09
2
314 Views
Last Modified: 2013-11-07
Hi using the graphics objects I managed to a draw a pie segment on the screen.

I'm now stuck because when I hover over the pie segment I need to display some text. Any ideas?

I have tried many things, I even tried to get the pixel color at a mouse point so that I could compare that colour with the colour I painted the segment with. But at the moment I battling to even get the colour from a pixel.
0
Comment
Question by:dfincham28
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 24820955
Build a GraphicsPath() instance for each slice of the pie and build it up using the coordinates and associated drawing methods.  Then when the mouse moves over the pie you iterate over the GraphicsPath (store them in a List) and see if one contains the current position with the IsVisible() method.  If a match is found then display your tooltip or message in some control.

See: http://msdn.microsoft.com/en-us/library/system.drawing.drawing2d.graphicspath.aspx
0
 

Author Closing Comment

by:dfincham28
ID: 31601962
This was very helpful thank you idle mind
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question