1 GDI+的核心:Graphics类
(1)The Graphics class provides methods for drawing lines, curves, figures, images, and text. A Graphics object stores attributes of the display device and attributes of the items to be drawn.【msdn】
Graphics是一个device context和你的drawing conetent之间的一个中介。它存储了device context的相关属性,以及drawing content的属性。这样,它就能用自己的方法把drawing content“映射”到device content 之上。
(2)GDI+的核心是Graphics类,包含了显示、绘图等功能。它提供了四个构造函数:
Graphics::Graphics(Image*)
Graphics::Graphics(HDC)
Graphics::Graphics(HDC,HANDLE)
Graphics::Graphics(HWND,BOOL)
构造函数1从image对象创建一个Graphics类。这种方式允许你在打开某张,或者生成某张位图之后,应用Grapgics的方法对改位图进行操作。
构造函数2从一个传统的HDC获取一个Graphics对象,把传统的在HDC完成的操作接手过来。也就是当要画直线,曲