As3 放大图像
我想创建一个图像放大应用程序,如下所示: 一个遮罩的小窗口显示与小图像上的鼠标 X 和 Y 相对应的大图像区域。网上有很多放大图像应用程序示例,例如:
http://www.flashandmath.com/ middle/magglass/mag_glass.html
但这里鼠标和蒙版以相同的 X 和 Y 移动。我想要的是蒙版窗口仅在小图像上显示与鼠标 X 和 Y 相对应的某些区域。
任何帮助将不胜感激。谢谢。
I want to create a image magnify application like following:
A masked small window showig big image area corresponding to the mouse X and Y on the small image. There are many magnifying image application exaples online such as:
http://www.flashandmath.com/intermediate/magglass/mag_glass.html
But here the mouse and mask moves with same X and Y. What i want is that masked window display only certain area corresponding to mouse X and Y on Small image.
Any help would be highly appreciated. thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我去年写了一份食谱,正是你想要的。我不保证它会尽可能地重构或高效,但它确实运作良好。只要你喜欢,就可以改变它。我将代码发布给任何人免费使用。
但是,未经事先请求,我不允许任何人使用照片和放大镜资产。
该类允许您更改自己的放大强度,甚至可以在运行时更改(如果您愿意)。您可以使用自己的放大镜图形,但源文件中也包含一个(如果您想在项目中使用它,请先询问我)。
描述:
类文件:
i wrote a recipe last year for exactly what you're looking for. i do not guarantee that's it's as refactored or efficient as it could be, but it works really well. change it up as much as you like. i post the code hear for anyone to freely use.
however, the photograph and loupe asset i do not permit anyone to use without prior request, please.
the class lets you alter your own magnification strength, even at runtime if you want. you can use your own loupe graphic, but one is also included in the source files (please ask me first if you want to use it in your project).
Description:
Class FIle: