在可滚动的PictureBox中从屏幕坐标映射到图像坐标. [英] Mapping from screen coordinate to image coordinate in a scrollable PictureBox.

查看:211
本文介绍了在可滚动的PictureBox中从屏幕坐标映射到图像坐标.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将PictureBox放置在可滚动面板内. SizeMode是Zoom. PictureBox.Image大于PictureBox.Size.滚动滚动条后,在屏幕上给定特定点,例如Point(x,y),如何获取该屏幕点的对应图像点坐标?

谢谢!

superZZ

I place a PictureBox inside a scrollable panel. SizeMode is Zoom. The PictureBox.Image is larger than PictureBox.Size. After rolling the scroll bar, given a specific point on screen, say Point(x,y), how to get the cooresponding image point coordinate for that screen point?

Thanks!

superZZ

推荐答案

使用滚动位置并将其添加到鼠标位置.
By using the scroll positions and adding them to the mouse position.


这篇关于在可滚动的PictureBox中从屏幕坐标映射到图像坐标.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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