Chinaunix首页 | 论坛 | 博客
  • 博客访问: 158155
  • 博文数量: 75
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 749
  • 用 户 组: 普通用户
  • 注册时间: 2013-11-19 11:38
文章分类
文章存档

2014年(38)

2013年(37)

我的朋友

分类: C#/.net

2014-01-10 11:37:55

从v6.023开始, 新增DrawCCSAxis函数,这个函数包含以像素为单位的轴宽高。它主要用于处理文档的OnDrawOverAll事件,用于绘制坐标轴,并且可以以指定的尺寸绘制CCS轴

下面是相关的参数介绍:

1
2
3
4
5
6
7
8
9
10
11
12
13
param name="render": The ActiveActionRender of the Document.
param name="DrawXAxis": A boolean value representing if the x axis will be drawn.
param name="DrawYaxis": A boolean value representing if the y axis will be drawn.
param name="DrawZaxis": A boolean value representing if the z axis will be drawn.
param name="DrawStrings": A boolean value representing if the strings will be drawn.
param name="XAxisColor": A System.Color indicating the color of the x axis.
param name="YAxisColor": A System.Color indicating the color of the y axis.
param name="ZAxisColor": A System.Color indicating the color of the z axis.
param name="showUserCS": A boolean value representing if the axis will be drawn relative to User Coordinate System or WorldCS.
param name="showOnOrigin": A boolean value representing if the axis will be drawn on the origin of selected Coordinate System on on the LowerLeft conrer of the screen.
param name="axiswidth": The width of the axis in pixels. The default VectorDraw axis is 5.0 pizels.
param name="axislength": The length of the axis in pixels. The default VectorDraw axis is 40.0 pizels.
public void DrawCCSAxis(vdRender render, bool DrawXAxis, bool DrawYaxis, bool DrawZaxis, bool DrawStrings, Color XAxisColor, Color YAxisColor, Color ZAxisColor, bool showUserCS, bool showOnOrigin, double axiswidth , double axislength)

覆盖DrawOverall事件的方法:

1
2
3
4
5
6
void BaseControl_DrawOverAll(object sender, vdRender render, ref bool cancel)
{
vdDocument document = sender as vdDocument;
document.ActiveLayOut.DrawCCSAxis(render, true, true, true, true, System.Drawing.Color.Red, System.Drawing.Color.Green, System.Drawing.Color.Blue, true, true,10.0,80.0);
cancel = true;
}

*

阅读(1659) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~