WPF - 旋转图像后找到图像的实际顶部和左侧

发布于 2024-07-05 20:41:52 字数 135 浏览 10 评论 0原文

我正在使用 WPF,并且画布上有一张 8.5" * 11" 的纸图像。 然后,我使用 RotateTransform 旋转图像,轴位于页面中间(即 RotateTransformOrigin="0.5,0.5")。 如何在画布上找到图像角点的实际位置?

I am using WPF and I have an image of an 8.5" * 11" piece of paper on a Canvas. I am then rotating the image using a RotateTransform, with the axis being in the middle of the page (that is, RotateTransformOrigin="0.5,0.5"). How can I find the actual location on the canvas of the corners of the image?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

凹づ凸ル 2024-07-12 20:41:52
_image.TranslatePoint(new Point(0, 0), _canvas);

这行吗?

_image.TranslatePoint(new Point(0, 0), _canvas);

Will this do?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文