MultiScaleImage 的视口原点
我对 MultiScaleImage 的 ViewportOrigin 属性感到困惑。 我认为该属性应该仅用于MultiScaleSubImage来将子图像的相对位置分配给整个深度缩放区域,为什么我们需要设置MultiScaleImage的ViewportOrigin属性(即整个深度缩放区域)? 整个深度缩放区域的左上角始终为 (0, 0),那么为什么需要为整个深度缩放区域应用 ViewPortOrigin 属性呢?
从下面的 MSDN 链接中,我们可以了解到此属性适用于 MultiScaleImage 和 MultiScaleSubImage。
http://msdn.microsoft.com/en-us /library/cc963427(VS.95).aspx
当我们需要设置 MultiScaleImage 的 ViewportOrigin 属性时,有人可以给我看一个示例吗?
提前致谢, 乔治
I am confused about the ViewportOrigin property of MultiScaleImage. I think the property should be used only for MultiScaleSubImage to assign the relative location of a sub image to the whole deep zoom region, why we need to set the ViewportOrigin property of MultiScaleImage (i.e. the whole deep zoom region)? The whole deep zoom region's left-top corner is always (0, 0), so why need to apply ViewPortOrigin property for the whole deep zoom area?
From the below MSDN link, we can learn this property apply for both MultiScaleImage and MultiScaleSubImage.
http://msdn.microsoft.com/en-us/library/cc963427(VS.95).aspx
Could anyone show me a sample when we nede to set the ViewportOrigin property of MultiScaleImage please?
thanks in advance,
George
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过操作 ViewportOrigin 属性,您可以通过编程方式设置当前希望图像的哪一部分可见。 如果您认为放大的图像使您无法通过视口看到全部内容,那么这一点就更有意义了; 例如,一张大地图。 如果您希望能够从列表中选择一个位置并使地图滚动到该位置,您可能(事实上我就是这样做)编写如下内容:
其中 ZoomMap 是我的 MultiScaleImage 控件的名称。 希望有帮助!
Manipulating the ViewportOrigin property is how you would programatically set what part of the image you currently want to be visible. This is far more relevant if you think of an image that's zoomed in so that you can't see all of it through the viewport; say, for example, a large map. If you want to be able to select a location from a list and have the map scroll to that location, you might (and in fact I did) write something like this:
Where ZoomMap is the name for my MultiScaleImage control. Hope that helps!