我想创建一个图像查看器。我不知道从哪里开始。能否请您给我一些开始的提示。
我有以下几点想法
- 创建自定义控件,覆盖绘制事件。使用属性读取、翻转、旋转和缩放图像
- 创建一个内部有面板的用户控件,将背景设置为图像,同时我将公共(public)属性设置为“读取”。实现旋转、翻转、缩放的属性
最佳答案
我建议你使用 WPF 而不是 winforms
使用 WPF 的缩放和平移示例:http://blogs.windowsclient.net/joeyw/archive/2009/06/02/pan-and-zoom-updated.aspx
This主题有旋转等示例代码:
This topic provides an introduction to the Microsoft Windows Presentation Foundation Imaging Component. WPF Imaging enables developers to display, transform, and format images.
This topic contains the following sections.
WPF Imaging Component WPF Image Formats Displaying Images in WPF Image Metadata Codec Extensibility Related Topics
关于c# - 图像查看器的用户控件与自定义控件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5949459/