drawing中画固定圆

来源:互联网 发布:七天网络怎么绑定 编辑:程序博客网 时间:2024/05/01 21:36
<pre name="code" class="cpp">// 画固定圆
int UsrArcentityCreate(ProDrawing drawing, ProColortype color){ProDtlentitydata edata;ProCurvedata *curve;ProDtlentity entity;ProColor entity_color;int cur_sheet;ProView view;ProDtlentitydataAlloc(drawing, &edata);ProCurvedataAlloc(&curve);ProVector vector1,vector2;Pro3dPnt center;double radius = 100;vector1[0] = 1.0;vector1[1] = 0.0;vector1[2] = 0.0;vector2[0] = 0.0;vector2[1] = 1.0;vector2[2] = 0.0;double start_angle = 0.0;double end_angle = TWOPI;ProArcdataInit(vector1,vector2,center,start_angle,end_angle,radius,curve);ProDtlentitydataCurveSet(edata, curve);ProDrawingCurrentSheetGet (drawing, &cur_sheet);ProDrawingBackgroundViewGet (drawing, cur_sheet, &view);ProDtlentitydataViewSet (edata, view);entity_color.method = PRO_COLOR_METHOD_TYPE;     entity_color.value.type = color; ProDtlentitydataColorSet(edata, &entity_color);ProDtlentityCreate(drawing, NULL, edata, &entity);ProWindowRepaint (PRO_VALUE_UNUSED);ProDtlentitydataFree(edata);return PRO_TK_NO_ERROR;}// 画固定圆void CTestDlg2::OnBnClickedButton9(){ProMdl mdl;ProError err = ProMdlCurrentGet(&mdl);ProDrawing drawing = (ProDrawing)mdl;UsrArcentityCreate(drawing,PRO_COLOR_LETTER);}

0 0
原创粉丝点击