예제 #1
0
        public ShapeBase ViewToWin(ShapeBase shape)
        {
            var ret = shape.Clone();
            ret.Location = ViewToWin(shape.Location);
            ret.Size = ViewToWin(shape.Size);
            ret.OutlineWidth = ViewToWin(shape.OutlineWidth);

            for (int i = 0; i < shape.Vertices.Count; i++)
            {
                ret.Vertices[i].X = ViewToWin(shape.Vertices[i].X);
                ret.Vertices[i].Y = ViewToWin(shape.Vertices[i].Y);
            }

            return ret;
        }
예제 #2
0
        public ShapeBase ViewToWin(ShapeBase shape)
        {
            var ret = shape.Clone();

            ret.Location     = ViewToWin(shape.Location);
            ret.Size         = ViewToWin(shape.Size);
            ret.OutlineWidth = ViewToWin(shape.OutlineWidth);

            for (int i = 0; i < shape.Vertices.Count; i++)
            {
                ret.Vertices[i].X = ViewToWin(shape.Vertices[i].X);
                ret.Vertices[i].Y = ViewToWin(shape.Vertices[i].Y);
            }

            return(ret);
        }
예제 #3
0
        public ShapeBase WinToView(ShapeBase shape)
        {
            if (shape == null)
                return null;

            var ret = shape.Clone();
            ret.Location = WinToView(shape.Location);
            ret.Size = WinToView(shape.Size);
            ret.OutlineWidth = WinToView(shape.OutlineWidth);

            for (int i = 0; i < shape.Vertices.Count; i++)
            {
                ret.Vertices[i].X = WinToView(shape.Vertices[i].X);
                ret.Vertices[i].Y = WinToView(shape.Vertices[i].Y);
            }

            return ret;
        }
예제 #4
0
        public ShapeBase WinToView(ShapeBase shape)
        {
            if (shape == null)
            {
                return(null);
            }

            var ret = shape.Clone();

            ret.Location     = WinToView(shape.Location);
            ret.Size         = WinToView(shape.Size);
            ret.OutlineWidth = WinToView(shape.OutlineWidth);

            for (int i = 0; i < shape.Vertices.Count; i++)
            {
                ret.Vertices[i].X = WinToView(shape.Vertices[i].X);
                ret.Vertices[i].Y = WinToView(shape.Vertices[i].Y);
            }

            return(ret);
        }