Ensoi

Ensoi

  • NA
  • 28
  • 7.8k

Graph setting -Ve value in c#

Apr 29 2013 2:54 AM
hi

We have clarification i.e., if y is -ve in the below code, the line is not getting plotted inside the picturebox.

Kindly let us know how to set the -ve value in picture box

int height = pictureBox3.Size.Height;
int wid = pictureBox3.Size.Width;
Point pt1 = new Point(x, y + (int)((float)height * 10 / 11));
Point pt2 = new Point(x + wid, y + (int)((float)height * 10 / 11));
e.Graphics.DrawLine(Pens.Black, pt1, pt2);