本文介绍了如何将画布的x,y原点更改为左下角并翻转y坐标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一堆数据点,我想双向绑定到画布上的点。
这些点假设较大的y值反映在像大多数数学图一样向上的方向。
如何将画布的x,y原点更改为左下角并将其转换为y坐标的解释?
(我想留在XAML中)
解决方案
<画布>
< Canvas.LayoutTransform>
< ScaleTransform ScaleX =1ScaleY = - 1CenterX =。5CenterY =。5/>
< / Canvas>
I have a bunch of data points that I would like to two-way bind to points on a canvas.
The points assume larger y values are reflected in an upwards direction like most math graphs.
How do I change the x,y origin of the canvas to the bottom left corner and reverse it's interpretation of the y coordinate?
(I would like to stay in XAML)
解决方案
<Canvas>
<Canvas.LayoutTransform>
<ScaleTransform ScaleX="1" ScaleY="-1" CenterX=".5" CenterY=".5" />
</Canvas.LayoutTransform>
</Canvas>
这篇关于如何将画布的x,y原点更改为左下角并翻转y坐标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
07-31 23:01