- mariorancic
- Posts: 23
- Joined:
RotateTransform to rotate one existing Point around other
I am trying to rotate one existing point around the other and in WPF it is possible with method Transform of RotateTransform class
and for example I can do this:
RotateTransform rotation = new RotateTransform();
rotation.Angle = 45;
rotation.CenterX = p1.X;
rotation.CenterY = p1.Y;
p2 = rotation.Transform(p2);
but in NoesisGUI this method does not exist and what I can do instead.
and for example I can do this:
RotateTransform rotation = new RotateTransform();
rotation.Angle = 45;
rotation.CenterX = p1.X;
rotation.CenterY = p1.Y;
p2 = rotation.Transform(p2);
but in NoesisGUI this method does not exist and what I can do instead.
Re: RotateTransform to rotate one existing Point around other
You can use Transform2::RotateAt(angle, centerX, centerY) in Noesis
- mariorancic
- Posts: 23
- Joined:
Re: RotateTransform to rotate one existing Point around other
I am using NoesisGUI .net SDK and I do not see Transform2 class
Anyway, maybe with little help of Microsoft open sourced WPF, maybe I found answer on my own question:
Matrix matrix = new Matrix();
matrix.RotateAt(angle, centerX, centerY);
p2 = matrix.Transform(p2);
Maybe this will work, otherwise i have to somehow to get access to Transform2 class
Anyway, maybe with little help of Microsoft open sourced WPF, maybe I found answer on my own question:
Matrix matrix = new Matrix();
matrix.RotateAt(angle, centerX, centerY);
p2 = matrix.Transform(p2);
Maybe this will work, otherwise i have to somehow to get access to Transform2 class
Re: RotateTransform to rotate one existing Point around other
I see, your message was not marked with the tag C#, so I thought you were using C++.
Yes, that should work.
Yes, that should work.
Who is online
Users browsing this forum: Google [Bot] and 53 guests