多尺度图像缩放特定区域

发布于 2024-08-05 04:33:10 字数 198 浏览 6 评论 0原文

我正在尝试创建一个基于深度缩放的多尺度图像,该图像本质上有 2 个视图。最初它将显示一张大世界地图。当用户单击美国时,图像应放大到美国。单击外部按钮应将图像缩小。就是这样。我不想平移或额外缩放。

我不明白的是如何定义美国周围的“命中区域”并将其放大。任何人都可以提供资源链接来解释如何做到这一点...我似乎从来没有找到我所追求的确切内容?

提前致谢。

I am trying to create a Deep Zoom based multiscale image that essentially has 2 views. Initially it will display a large map of the world. When the user click the USA the image should then zoom into the USA. Clicking an external button should zoom the image back out. Thats it. I don't want panning or additional zooming.

What I don't understand is how to define a "hit area" around the USA that zooms it in. Can anyone provided links to resources that explain how to do this... I never seem to find exactly what I am after?

Thanks in advance.

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

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

发布评论

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

评论(1

我的痛♀有谁懂 2024-08-12 04:33:10

我记不清具体的代码了。

但是如果你在 Deepzoom Composer 中用源代码生成一个项目,然后看一下源代码。

Deepzoom 代码的底部是一个用于放大 LogicalPoint 的函数。

将要缩放的图像的左上角点转换为逻辑点。将其设置为您的 ViewportOrigin,因为这会将其放在左上角。

http:// blogs.msdn.com/jaimer/archive/2008/06/23/working-with-collections-in-deep-zoom.aspx 这篇文章很好地解释了 ViewportOrigin。请记住,一切都与宽度有关。

您还需要设置 ViewportWidth。

当 ViewportWidth = 1 时,将显示整个图像,因此它将是图像总宽度的一小部分。 (美国宽度/世界地图宽度)

希望这是有道理的。

I can't remember the code exactly.

But if you generate a project with the source code in Deepzoom composer and then take a look at the source code.

Right down the bottom of the the Deepzoom code is a function for zooming into a LogicalPoint.

Convert the top left point of the image you are zooming into a logical point. Set this as your ViewportOrigin as this will put it in the top left.

http://blogs.msdn.com/jaimer/archive/2008/06/23/working-with-collections-in-deep-zoom.aspx This post here explains the ViewportOrigin quite well. Just remember that everything is related to the Width.

You will also need to set the the ViewportWidth.

When the ViewportWidth = 1 the whole image is displayed so it will be a fraction of the total width of the image. (USA width / WorldMap Width)

Hope this makes sense.

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