Silverlight 4.0 - 使用鼠标事件裁剪图像
我的任务是在 Silverlight 4.0 应用程序中构建图像裁剪功能。我需要做的是让用户在应用裁剪后用鼠标左键单击选择要保留的区域,然后调用其他事件(可能单击按钮)来应用该裁剪本身。
我确实开发了类似的旋转功能。我很确定也可以进行裁剪,但目前这项任务可能很少见,因为我在网上找不到有关该主题的教程。
如果你们能给我一个开始的片段或者指出一些关于 Silverlight 4.0 图像裁剪的好教程,我将不胜感激。
谢谢!
I have a task to build image cropping functionality in Silverlight 4.0 application. What I need to do is to have user on the left button mouse click select area to remain after cropping is applied and then call some other event (button click maybe) to apply that cropping itself.
I did develop similar functionality for rotation. I am pretty sure it is possible to do for cropping as well but that task is probably rare at this point for I can't find tutorials on the topic in the net.
If you guys can get me a snippet to begin with or point to some good tutorial about Silverlight 4.0 image cropping, I would appreciate it.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
就裁剪图像而言,您可以使用 codeplex 上的 WriteableBitmapEx 库。
现在您只需在包含图像的画布上绘制一个矩形来描述裁剪区域。
As far as cropping images are concerned you can use the WriteableBitmapEx library on codeplex.
Now you just need to draw a rectangle on a canvas containing the image to describe the crop region.