网学网为需要VC++的朋友们搜集整理了一种矢量图形工具的设计与实现相关资料,希望对各位网友有所帮助!
包括论文,设计,论文字数:12121,页数:29
摘 要
矢量图形系统的开发是利用VC++开发地理信息系统(GIS系统)的重点和难点。利用VC++进行矢量图形系统的开发主要是利用VC++的设备环境DC提供的功能进行图形绘制和采用面向对象的方法来组织和管理矢量图形数据。
该论文分析了矢量图形系统的基本结构,采用了面向对象的思想,设计了图形对象的类继承层次,其中基类对象又派生出直线、圆弧(圆)和曲线,文本等类,给出了矢量图形系统类的组织结构。并且从整体功能结构到单独的类的具体实现和视图的实现,鼠标交互绘制,图形操作,图形选中、移动、删除等各个方面开发实现了一个基本的矢量图形工具系统。完成了处理点、线、圆、面、标注文本等图形元素的功能,并具有处理图例(即图形块)的能力;具有相对完善的图形操作功能,方便的图形I/O功能,以及图形移动、删除的功能。
关键词:面向对象;图形操作;I/O;
The Design and Realization of a Vector Graphics Tool
Abstract
The Vector Graphics system is one of the most important and difficult parts for GIS(Geographical Information System) development with VC++. The Vector Graphics system mainly includes implementing different drawing functions under the environment provided by VC + + 6.0, organizing and managing vector-based graphic data by means of object-based methods.
The idea of object-oriented is introduced in this paper, the geographic elements in the system are classified into line, arc(circle) ,curve and text. The basic classes’ framework is proposed by analyzing the basic structure of the vector graphics system. A basic vector graphics tool system is designed and realized from the kind of organization, the view’s realization, the mouse’s alternately draws up, the graphics operation, the graph selected, migration, deletion, and so on. Different drawing functions are implemented, including spot, line, circle, surface and note text. The system has the ability of processing chart of symbols (namely graph block). The realizations of relative consummation graphics operation function and facilitates graph I/O function is given, as well as graph migration, deletion function.
Key words : Object-oriented; Graph operation; I/O;
目 录
1 引言 1
1.1 课题背景及研究的目的和意义 1
1.2 矢量图形系统 1
1.3 课题研究方法 1
2 总体设计思想 2
2.1 整体功能模块的设计 2
2.2 功能模块说明 2
3 矢量图形结构 3
3.1 基类的组织 3
3.2 视图的实现 5
3.2.1 实际坐标与逻辑坐标的转换 5
3.2.2 图形元素的绘制功能 6
3.3 图形操作方面 6
3.3.1 屏幕状态的记录 6
3.3.2 边界矩形 7
3.3.3 点选的判断和特殊显示 7
3.3.4 图形的移动 9
3.4 提高图形重画速度 9
4 矢量图形工具系统的设计 10
4.1 类的实现 10
4.2 鼠标交互绘制 13
4.3 重画技术 13
4.3.1 图形重画 13
4.3.2 重画上屏、首屏和显示全图 15
4.4 图形移动和选中后操作 17
4.4.1 图形点选功能 17
4.4.2 图形移动 20
5 系统测试 21
结 论 22
参考文献 23
致 谢 24
声 明 25