如何由闭合区域内部一点绘制填充对象?
C#开发|冯美娟|2018-12-20 10:22
-
回答:
主要用到函数说明:
MxDrawXCustomFunction::Mx_DrawHatchFromPointEx
由闭合区域内部一个点,绘制一个填充对象,详细说明如下:
参数 说明 DOUBLE dX
点坐标X 点坐标Y
DOUBLE dPatternScale
填充图案缩放比例
long ladOpt
对填充内部的孤岛的处理.0 =忽略孤岛, 1 = 处理孤岛, 2 = 嵌套处理孤岛
c#代码实现如下:
MxDrawUtility mxUtility = new MxDrawUtility(); MxDrawPoint point = (MxDrawPoint)(mxUtility.GetPoint(null, "点一点:") ); if (point == null) { MessageBox.Show("用户取消.."); return; } MxDrawResbuf param = new MxDrawResbuf(); param.AddDouble(point.x); param.AddDouble(point.y); param.AddDouble(1.0); param.AddLong(0); axMxDrawX1.CallEx("Mx_DrawHatchFromPointEx", param);