----------图形概述
GDI+是如何工作的呢?为了弄清这个问题,让我们来分析一个示例—绘制一条线段。实质上,一条线段就是一个从一个开始位置(X0,Y0)到一个结束位置(Xn,Yn)的一系列像素点的集合。为了画出这样的一条线段,设备(在本例中指显示器)需要知道相应的设备坐标或物理坐标。
然而,开发人员不是直接告诉该设备,而是调用GDI+的drawLine()方法,然后,由GDI+在内存(即“视频内存”)中绘制一条从点A到点B的直线。GDI+读取点A和点B的位置,然后把它们转换成一个像素序列,并且指令监视器显示该像素序列。简言之,GDI+把设备独立的调用转换成了一个设备可理解的形式;或者实现相反方向的转换。