设备坐标系是指显示设备或打印设备坐标系下的坐标,它的特点是以设备上的象素点为单位。对于窗口中的视图而言,设备坐标的原点在客户区的左上角,x坐标从左向右递增,y坐标自上而下递增。由于设备的分辨率不同,相同坐标值的物理位置可能不同。如对于边长为100的正方形,当显示器为640 x 480和800 x 600时的大小是不一样的。
LinearGradientBrush(Point & point1, Point & point2, Color & color1, Color & color2); LinearGradientBrush(Rect & rect, Color & color1, Color & color2, REAL angle, BOOL isAngleScalable); LinearGradientBrush(Rect & rect, Color & color1, Color & color2, LinearGradientMode mode);
需要说明的是,代码中的MatrixOrderAppend用来指明第二个矩阵(若有)的操作次序是后置的,即matrix1 OP matrix2,OP表示某种操作;若为MatrixOrderPrepend 则表示matrix2 OP matrix1。而SetTransform则指定一个矩阵对点坐标进行变换,新的坐标点(x*,y*)结果可用下列公式来表示:
Pen pen(Color::Blue, 3); Point point1( 50, 200); Point point2(100, 150); Point point3(160, 180); Point point4(200, 200); Point point5(230, 150); Point point6(220, 50); Point point7(190, 70); Point point8(130, 220);