03-04-2010 10:12 AM
Hi All!
Now I want to make a picture that can be zoomed out and in with the display window in a form with a ScatterGraph window. I have previously attempted to make this picture as background, but the backgroundpicture cannot be zoomed out with the display window. How can I fix it?
Here is the picture:
Or I must calculate a large amout of points to sign on the xy coordination without the picture, and how can I sign out quickly, because it takes a long time to calculate.
Solved! Go to Solution.
03-08-2010 12:19 AM - edited 03-08-2010 12:25 AM
Hi there,
You can zoom/pan an image along with the plot in graphs. Here is some code snippet showing how you can do it.
Image img =
|
Make sure the image is of good quality so that you can zoom in fairly close.
Hope this helps.
04-26-2010 02:54 AM
Hi, I have used your code and it works fine but there is a little bug.
You will don´t see the Majordivions if you enabled this setting. The divisions are below the picture like following one shows.You will see the divisions if you zoom near the x-axis. I would say, that the graph plots the divisions before the BeforePlotEvent and so you overwrite the divisions with your picture!
But if you change the event form BeforedrawPlot to BeforeDrawPlotArea so you will draw the picture before the the system plots the divisions. And you will get the following result.
03-25-2011 10:26 AM
Hi I found a bug in this code, it creates the wrong color if ill zoome some steps. The Problem occures after this step:
initialRectangle.Width = size.X - initialRectangle.Location.X; initialRectangle.Height = size.Y - initialRectangle.Location.Y;
initialRectangle->X becomes more and more smaller and ends at -32768 You see it if you write
if(initialRectangle->X == -32768)
{
Debug.WriteLine("X:"+initialRectangle.Location.X); Debug.WriteLine("Y:"+initialRectangle.Location.Y); Debug::WriteLine("SIZEX:"+size->X); Debug.WriteLine("SIZEY:"+size->Y); }
e.Graphics.DrawImage...
The result looks like the following picture:
Maybe anyone has a solution for this problems, because i dont know how to work around this -32...