Silverlight、DeepZoom 缩放动画

发布于 2024-08-18 18:28:43 字数 101 浏览 3 评论 0原文

当我在 Silverlight 中设置 Deepzoom 图像的 ViewportWidth 时,缩放级别变化得非常快。有没有办法可以设置这个缩放动画应该花费的时间?

谢谢

When I set the ViewportWidth of a Deepzoom image in Silverlight the zoom level changes very quickly. Is there a way I can set the time this zooming animation should take?

Thanks

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

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

发布评论

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

评论(3

抹茶夏天i‖ 2024-08-25 18:28:43

唯一的方法是将 UseSprings 设置为 false,并自行为 ViewportWidth 的值设置动画。如果您想保持平移的“弹簧”动画,这也会迫使您在执行平移操作时对 ViewportOrigin 进行动画处理。

您需要测试其性能。 MultiscaleImage 很可能会以不同于这些属性在外部进行动画处理的方式优化其自身的动画。

The only way to do that would be to set UseSprings to false and animate the value of ViewportWidth yourself. This will also force you to animate the the ViewportOrigin as well when performing panning operations if you want to maintain the "spring" animation of panning.

You would need to test the performance of this. It could well be that MultiscaleImage may optimise its own animations differently than when these properties are being animated externally.

墨洒年华 2024-08-25 18:28:43

尝试使用 MultiScaleImage.UseSprings = true 和 ZoomAboutLogicalPoint() 方法。

Try using the MultiScaleImage.UseSprings = true and the ZoomAboutLogicalPoint() method.

花落人断肠 2024-08-25 18:28:43

虽然不能直接设定时间,但每个“Spring”正好需要1.5秒。因此,如果您愿意,您可以保留弹簧,然后计算当前视口宽度与您想要的视口宽度之间的差异,并尝试以这种方式调整计时。话虽这么说,它可能看起来很尴尬,所以你必须先测试一下。

Although you cannot set the timing directly, each "Spring" takes exactly 1.5 seconds. So, if you wanted to, you could leave springs on, and then calculate the difference between the current viewportwidth, the viewport width you want to go to, and try and massage the timing this way. That being said, it may look awkward, so you'd have to test it first.

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