Visual::TranslatePoint and TransformToXXX
Hi there! I was trying to convert coordinates from 1 visual to another, in C# I can use the TranslatePoint method (which in C++ doesn't exist) or the TransformToAncestor/TransformToVisual which returns a Transform that I can use. But in C++, TransformToXXX methods return a Matrix4 object and I can't see any way to transform a Point using it.
Could you tell me if I am going through a wrong direction here? I am quite new to XAML so maybe there is another way of transforming coordinates.
Thanks,
Could you tell me if I am going through a wrong direction here? I am quite new to XAML so maybe there is another way of transforming coordinates.
Thanks,
Re: Visual::TranslatePoint and TransformToXXX
Ok! I realized i was able to do the translation using Visual::PointToScreen with the new local position and Visual::PointFromScreen using the target element.
Still, I think those methods should be implemented in C++.
Cheers,
Still, I think those methods should be implemented in C++.
Cheers,
-
sfernandez
Site Admin
- Posts: 3109
- Joined:
Re: Visual::TranslatePoint and TransformToXXX
Yes, that allows transforming points from/to screen for a target element.i was able to do the translation using Visual::PointToScreen with the new local position and Visual::PointFromScreen using the target element
It can be useful indeed. Could you please report it in our bugtracker and we will add the TranslatePoint method to the UIElement.Still, I think those methods should be implemented in C++.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 3 guests