📄 pline.h
字号:
/////////////////////////////////////////////////////////////////////////////////
//
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -