Пример #1
0
        private void ResetSquare(RectangleF rec, Graphics g)
        {
            g.Clear(Color.White);
            g.SmoothingMode   = SmoothingMode.HighQuality;   //高质量
            g.PixelOffsetMode = PixelOffsetMode.HighQuality; //高像素偏移质量
            Pen p = new Pen(Brushes.Black, 1);

            g.DrawRectangle(p, rec.X, rec.Y, rec.Width, rec.Height);
            CanvasUtil.DrawGridLine(g, _gridLayer.IsVisible, _square, _gridNum);
            if (!_cornerInit)
            {
                InitCornerVertex();
            }

            foreach (OECPLayer layer in Layers)
            {
                RePaintLayerElements(layer, g);
            }
        }