public static Drawing.Rectangle GetBoundingBox(this IVisio.Shape shape, IVisio.VisBoundingBoxArgs args)
        {
            var surface = new Drawing.DrawingSurface(shape);
            var r       = surface.GetBoundingBox(args);

            return(r);
        }
        public static IVisio.Shape DrawLine(this IVisio.Shape shape, Drawing.Point p1, Drawing.Point p2)
        {
            var surface = new Drawing.DrawingSurface(shape);
            var s       = surface.DrawLine(p1, p2);

            return(s);
        }
Example #3
0
        public Drawing.DrawingSurface GetDrawingSurface()
        {
            this._client.Application.AssertApplicationAvailable();
            this._client.Document.AssertDocumentAvailable();

            var surf_Application    = this._client.Application.Get();
            var surf_Window         = surf_Application.ActiveWindow;
            var surf_Window_subtype = surf_Window.SubType;

            // TODO: Revisit the logic here
            // TODO: And what about a selected shape as a surface?

            this._client.WriteVerbose("Window SubType: {0}", surf_Window_subtype);
            if (surf_Window_subtype == 64)
            {
                this._client.WriteVerbose("Window = Master Editing");
                var surf_Master = (IVisio.Master)surf_Window.Master;
                var surface     = new Drawing.DrawingSurface(surf_Master);
                return(surface);
            }
            else
            {
                this._client.WriteVerbose("Window = Page ");
                var surf_Page = surf_Application.ActivePage;
                var surface   = new Drawing.DrawingSurface(surf_Page);
                return(surface);
            }
        }
        public static IVisio.Shape DrawQuarterArc(this IVisio.Shape shape, Drawing.Point p0, Drawing.Point p1, IVisio.VisArcSweepFlags flags)
        {
            var surface = new Drawing.DrawingSurface(shape);
            var s       = surface.DrawQuarterArc(p0, p1, flags);

            return(s);
        }
Example #5
0
        public static IVisio.Shape DrawPolyline(this IVisio.Page page, IList <Drawing.Point> points)
        {
            var surface = new Drawing.DrawingSurface(page);
            var shape   = surface.DrawBezier(points);

            return(shape);
        }
Example #6
0
        public static IVisio.Shape DrawRectangle(this IVisio.Page page, Drawing.Rectangle rect)
        {
            var surface = new Drawing.DrawingSurface(page);
            var shape   = surface.DrawRectangle(rect);

            return(shape);
        }
Example #7
0
        public static IVisio.Shape DrawBezier(this IVisio.Page page, IList <Drawing.Point> points, short degree, short flags)
        {
            var surface = new Drawing.DrawingSurface(page);
            var shape   = surface.DrawBezier(points, degree, flags);

            return(shape);
        }
        public static IVisio.Shape DrawLine(this IVisio.Page page, Drawing.Point p1, Drawing.Point p2)
        {
            var surface = new Drawing.DrawingSurface(page);
            var shape   = surface.DrawLine(p1.X, p1.Y, p2.X, p2.Y);

            return(shape);
        }
        public Drawing.DrawingSurface GetDrawingSurface()
        {
            this.Client.Application.AssertApplicationAvailable();
            this.Client.Document.AssertDocumentAvailable();

            var surf_Application = this.Client.Application.Get();
            var surf_Window = surf_Application.ActiveWindow;
            var surf_Window_subtype = surf_Window.SubType;

            // TODO: Revisit the logic here
            // TODO: And what about a selected shape as a surface?

            this.Client.WriteVerbose("Window SubType: {0}", surf_Window_subtype);
            if (surf_Window_subtype == 64)
            {
                this.Client.WriteVerbose("Window = Master Editing");
                var surf_Master = (IVisio.Master)surf_Window.Master;
                var surface = new Drawing.DrawingSurface(surf_Master);
                return surface;

            }
            else
            {
                this.Client.WriteVerbose("Window = Page ");
                var surf_Page = surf_Application.ActivePage;
                var surface = new Drawing.DrawingSurface(surf_Page);
                return surface;
            }
        }
Example #10
0
        public static IVisio.Shape Drop(
            this IVisio.Page page,
            IVisio.Master master,
            Drawing.Point point)
        {
            var surface = new Drawing.DrawingSurface(page);

            return(surface.Drop(master, point));
        }
        public static IVisio.Shape DrawNURBS(this IVisio.Page page, IList <Drawing.Point> controlpoints,
                                             IList <double> knots,
                                             IList <double> weights, int degree)
        {
            var surface = new Drawing.DrawingSurface(page);
            var shape   = surface.DrawNURBS(controlpoints, knots, weights, degree);

            return(shape);
        }
        public static short[] DropManyU(
            this IVisio.Page page,
            IList <IVisio.Master> masters,
            IEnumerable <Drawing.Point> points)
        {
            var surface = new Drawing.DrawingSurface(page);

            short[] shapeids = surface.DropManyU(masters, points);
            return(shapeids);
        }
 public static Drawing.Rectangle GetBoundingBox(this IVisio.Shape shape, IVisio.VisBoundingBoxArgs args)
 {
     var surface = new Drawing.DrawingSurface(shape);
     var r = surface.GetBoundingBox(args);
     return r;
 }
 public static IVisio.Shape DrawQuarterArc(this IVisio.Shape shape, Drawing.Point p0, Drawing.Point p1, IVisio.VisArcSweepFlags flags)
 {
     var surface = new Drawing.DrawingSurface(shape);
     var s = surface.DrawQuarterArc(p0, p1, flags);
     return s;
 }
 public static IVisio.Shape DrawLine(this IVisio.Shape shape, Drawing.Point p1, Drawing.Point p2)
 {
     var surface = new Drawing.DrawingSurface(shape);
     var s = surface.DrawLine(p1, p2);
     return s;
 }