0
Answer

Graph setting -Ve value in c#

Ask a question
Ensoi

Ensoi

11y
882
1
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);