2

I want to fill the area down to the maximum value in a GraphPane.

Graph

I think I could create a new filled curve at the background with points seperated by an interval. I could use the FindNearestPoint to find maximum value for a specified x but I'm confused that I should pass mouse coordinates. I have a concrete x in a GraphPane coordinate system, not a mouse x value.

How can I calculate those mouse corrdinates? GraphPane doesn't provide its location. Or am I doing it wrong way?

Vlad
  • 3,001
  • 1
  • 22
  • 52
  • What color do you want to fill it with? A constant color or the color of either max or min point in given x position? – Tarec Feb 14 '14 at 16:51
  • @Tarec, constant would be ok if it's simpler. – Vlad Feb 14 '14 at 16:54
  • @Tarec, are you going to suggest anything? Just thought you may have not received my comment because I didn't mention you (edited afterwise). – Vlad Feb 14 '14 at 18:11
  • I was thinking about it, but I don't really see any clean way to do that. One of the possibilities is to use a solid background color, take out a bitmap from the control and then draw it manually, but that'd be unefficient for sure. Another way would be to create yourself a custom control, where you'd handle drawing it all on your own, but that's a lot of work. `FindNearestPoint` doesn't have to be invoked with mouse parameters - a custom point will be fine. I'm sorry, but I don't know the control and nothing usefull comes to my mind. – Tarec Feb 15 '14 at 01:08

0 Answers0