e.Graphics.DrawRectangle(new Pen(Color.Turquoise,2),10,10,50,50);// works!!! but without scrolling and zooming
This is my result. All I want works, but it is very inexect in the area auf the
edge points. Can anyone help me?
Another Problem is to use this one outside, i.e with a ButtonClick.
PointF point1 = e.Plot.MapDataPoint(e.Bounds, 1.0, 1.0);PointF ZeroPoint = e.Plot.MapDataPoint(e.Bounds, 0.0, 0.0); PointF point5 = e.Plot.MapDataPoint(e.Bounds, 1.0, 1.0); Point point6 = new Point(Math.Abs((int)point5.X - (int)ZeroPoint.X), Math.Abs((int)point5.Y - (int)ZeroPoint.Y)); Size mySize = new Size(point6); Point point7 = new Point((int) point1.X, (int) point1.Y); e.Graphics.DrawRectangle(new Pen(Color.Turquoise,3), new Rectangle( point7, mySize) );
I just want code with that i can handle the problem to
get a rectangle which is able to move in the graph and
able to change the size. I should can click on one edge
of the rectangle an set the edgepoint new on the graph.
Ok, everything in the project works...
now i have to solve the problem with the rectangles....
this is a kind of example project, which shows my problem.
now after the rectangle is painted in the graph
i want to be able zo click on an edge of this rectangle
and change the location of the edge.
hope you understand me.