|
项目描述: |
Recently I had to develop a Graphics Software and wanted to add support for drawing an Arrow Line / Measuring Line. This was essential for the software and I had no option but to go over my trigonometry fundas. After churning for a couple of hours , I came up with this technique for drawing arrowheads at the end of a line.
The Lines are drawn when you drag the mouse . The drawing mode used is R2_NOT .As long as the user is dragging the mouse , the Line is refreshing itself (by redrawing) . You need to include "math.h" in your View.cpp file .
绘制带箭头的线
最近我开发了一个图形软件并且想增加画带箭头的线 /测量线的支持。 这对软件是必要的,而且我除了详细察看我的 trigonometry fundas外,别无选择。 在几个小时的困惑之后,我发现了这个在线的末尾画箭头的技术。
当你拖动鼠标的时候,线就被画了。使用的绘画模式为R2_NOT。随着用户拖拉鼠标,线条不断刷新(通过重划)。在你的View.cpp文件中尼需要扩进"math.h"文件。
来源: http://www.codeguru.com/gdi/Arrow.html |
类别: |
|
发布者:
cbd002
|
|
最新发布源码包 |
软件包 |
版本号 |
日期 |
本地下载 |
ArrowDemo |
 1.0  |
2004-04-19 |
下载 |
|
|