基于视口中心而不是图像中心旋转图像 [英] Rotate an Image based on viewport centre not image centre

查看:90
本文介绍了基于视口中心而不是图像中心旋转图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了几个基于图像中心旋转图像的帖子,但我的要求是根据视口中心旋转图像。

例如,如果图像位于左上角首先查看端口然后旋转图像应该在右上角,图像的显示区域相同。



你能帮助我做这个吗?

I have found several posts to rotate an image based on image center but my requirement is to rotate an image based on viewport center.
For example, if the image is in top left corner of the view port at first and then after rotate the image should be in top right corner with same display area of the image.

Can you anyone help me to do this?

推荐答案

检查代码项目上的此链接 C#Image / PictureBox旋转 [ ^ ]



只需移动(TranslateTranform)指向您自己的自定义点。玩一下就能得到你需要的东西。



祝你好运!
Check this link on code project C# Image/PictureBox Rotations[^]

Just move (TranslateTranform) point to your own custom point. Play a bit to get exactly what you need.

Good luck!


这篇关于基于视口中心而不是图像中心旋转图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆