pline.h
来自「这是我做的一个VC++小程序」· C头文件 代码 · 共 39 行
H
39 行
/////////////////////////////////////////////////////////////////////////////////
//
// PLine.h: interface for the CPLine class.
//
////////////////////////////////////////////////////////////////////////////////
// 版权所有(2002)
// Copyright(2002)
// 编写者: 向世明
// Author: Xiang Shiming
//直线基元----Primitive line (PLine)
#ifndef _CPLINE_H
#define _CPLINE_H
#include "Grphcs.h"
class CPLine
{
public:
CPLine();
virtual ~CPLine();
public:
//采用Bresenham算法绘制一条颜色相同的直线
void Draw(CDC* pDC, POINT pt1, POINT pt2, COLORREF clr);
void Draw(CDC* pDC, int x1, int y1, int x2, int y2, COLORREF clr);
//采用Bresenham算法绘制一条颜色渐变的直线
void Draw(CDC* pDC, int x1, int y1, int x2, int y2, FLOATCOLORRGB clr1, FLOATCOLORRGB clr2);
void Draw(CDC* pDC, POINT pt1, POINT pt2, FLOATCOLORRGB clr1, FLOATCOLORRGB clr2);
//采用Windows 已有函数绘制一条指定风格的直线
void Draw(CDC* pDC, int x1, int y1, int x2, int y2, CPen& pen);
void Draw(CDC* pDC, POINT pt1, POINT pt2, CPen& pen);
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?