예제 #1
0
        public override Path draw(Insert insert)
        {
            end.X    += insert.anchor.X;
            end.Y    += insert.anchor.Y;
            anchor.X += insert.anchor.X;
            anchor.Y += insert.anchor.Y;

            Path path = draw();

            end.X    -= insert.anchor.X;
            end.Y    -= insert.anchor.Y;
            anchor.X -= insert.anchor.X;
            anchor.Y -= insert.anchor.Y;

            path.RenderTransform = insert.getTransforms(path.RenderTransform);

            return(path);
        }
예제 #2
0
        public override Path draw(Insert insert)
        {
            for (int i = 0; i < vertices.Length; i++)
            {
                vertices[i].X += insert.anchor.X;
                vertices[i].Y += insert.anchor.X;
            }

            Path path = draw();

            for (int i = 0; i < vertices.Length; i++)
            {
                vertices[i].X -= insert.anchor.X;
                vertices[i].Y -= insert.anchor.X;
            }

            return(path);
        }
예제 #3
0
        public override Path draw(Insert insert)
        {
            //Add the offset from the composite entity
            for (int i = 0; i < vertices.Length; i++)
            {
                vertices[i].X += insert.anchor.X;
                vertices[i].Y += insert.anchor.Y;
            }
            //Draw the offset entity
            Path path = this.draw();

            //Revert the offset from the composite entity
            for (int i = 0; i < vertices.Length; i++)
            {
                vertices[i].X -= insert.anchor.X;
                vertices[i].Y -= insert.anchor.Y;
            }

            //Apply block level scale and rotation transforms
            path.RenderTransform = insert.getTransforms(path.RenderTransform);

            //return the offset entity leaving the object unaltered
            return(path);
        }