阅读 93

AnyCAD C#开发-设置背景颜色,工作平面,坐标轴等renderView.SetBackgroundColor

 

      private void Form1_Load(object sender, EventArgs e)
        {
            //设置背景颜色
            renderView.SetBackgroundColor(new ColorValue(180, 182, 184), new ColorValue(230, 232, 234), new ColorValue(210, 212, 214));
            //隐藏工作平面
            renderView.ShowWorkingGrid(false);

            //隐藏默认的坐标轴
            renderView.ShowCoordinateAxis(false);
            
            //讲原有坐标系的xyz改名字
            ////xwh.EnableLeftHandCS();
            ////xwh.SetArrowText((int)EnumAxesDirection.Axes_Y, "w");
            ////xwh.SetArrowText((int)EnumAxesDirection.Axes_Z, "h");

            //设置局部坐标
            AxesWidget xwh = new AxesWidget();
            Coordinate3 coord = new Coordinate3(Vector3.ZERO, Vector3.UNIT_X, Vector3.UNIT_Y, Vector3.UNIT_Z);
            xwh.SetCoordinate(coord);
            renderView.ShowSceneNode(xwh);

            //设置坐标系到左下角
            ScreenWidget coorWidget = new ScreenWidget();
            coorWidget.SetNode(xwh);
            coorWidget.SetWidgetPosition((int)EnumWidgetPosition.WP_BottomLeft);
            renderView.Renderer.AddWidgetNode(coorWidget);

            GlobalInstance.EventListener.OnSelectElementEvent += OnSelectionEvent;

        }

 

Caesar卢尚宇

2020年11月22日

原文:https://www.cnblogs.com/nxopen2018/p/14022062.html

文章分类
代码人生
版权声明:本站是系统测试站点,无实际运营。本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 XXXXXXo@163.com 举报,一经查实,本站将立刻删除。
相关推荐