O
ollp
Guest
Hi all
I have a problem to find intersection point in between the red line and the black vertical line.
Its not a problem before rotation, as you can see the horisontal line rotates with the red object.
what confuse me is that the coordinates of points in the array<PointF>^ drawing = gcnew array<PointF>(360);
seems be rotated as well even if array is cleard
Pen^ red = gcnew Pen(Color::Red);
Pen^ blue = gcnew Pen(Color::Blue);
Pen^ black = gcnew Pen(Color::Black);
Bitmap^ DrawImage = gcnew Bitmap(Pbox1->Width, Pbox1->Height);
Graphics^ g = e->Graphics;
double dx = Pbox1->Width / 2.0;double dy = Pbox1->Height / 2.0;
g->TranslateTransform(dx, dy);
int size = drawing->Length;
inval = false;
g->DrawLines(red, drawing);
PointF one = PointF(drawing[270].X, drawing[270].Y);
PointF two = PointF(drawing[90].X, drawing[90].Y);
g->DrawLine(black, one, two);
PointF three = PointF(0, 0);
PointF four = PointF(0, -100);
g->DrawLine(blue, three, four);
Pbox1->Refresh();
delete red, blue, black;
Array::Clear(drawing,0, 359);
Array::Clear(circle, 0, 359);
all help appreciated
regards ollp
Continue reading...
I have a problem to find intersection point in between the red line and the black vertical line.
Its not a problem before rotation, as you can see the horisontal line rotates with the red object.
what confuse me is that the coordinates of points in the array<PointF>^ drawing = gcnew array<PointF>(360);
seems be rotated as well even if array is cleard
Pen^ red = gcnew Pen(Color::Red);
Pen^ blue = gcnew Pen(Color::Blue);
Pen^ black = gcnew Pen(Color::Black);
Bitmap^ DrawImage = gcnew Bitmap(Pbox1->Width, Pbox1->Height);
Graphics^ g = e->Graphics;
double dx = Pbox1->Width / 2.0;double dy = Pbox1->Height / 2.0;
g->TranslateTransform(dx, dy);
int size = drawing->Length;
inval = false;
g->DrawLines(red, drawing);
PointF one = PointF(drawing[270].X, drawing[270].Y);
PointF two = PointF(drawing[90].X, drawing[90].Y);
g->DrawLine(black, one, two);
PointF three = PointF(0, 0);
PointF four = PointF(0, -100);
g->DrawLine(blue, three, four);
Pbox1->Refresh();
delete red, blue, black;
Array::Clear(drawing,0, 359);
Array::Clear(circle, 0, 359);
all help appreciated
regards ollp
Continue reading...