瞬态图形比例

时间:2019-05-12 17:09:08

标签: graphics zoom autocad transient

我正在使用过渡图形绘制一个圆,但是其直径在屏幕上似乎比正常情况大

我试图控制当前屏幕尺寸的比例,但我不能

            ViewTableRecord view =new ViewTableRecord();
            view.CenterPoint = min2d + ((max2d - min2d) / 2.0);
            view.Height= max2d.Y - min2d.Y;
            view.Width = max2d.X - min2d.X;
            ed.SetCurrentView(view);

            double dViewRatio= (view.Width / view.Height);
            Point3d pn = db.Extmin;
            Point3d px = db.Extmax;

            Extents3d ents;
            using (Line acLine = new Line(pn, px))
            {
                 ents = new Extents3d(acLine.Bounds.Value.MinPoint,
                                            acLine.Bounds.Value.MaxPoint);
            }

            double dWidth = ents.MaxPoint.X - ents.MinPoint.X;
            double dHeight = ents.MaxPoint.Y - ents.MinPoint.Y;

0 个答案:

没有答案