Example #1
0
        public static void ResizeToFitContents(IVisio.Page page, VA.Drawing.Size padding)
        {
            // first perform the native resizetofit
            page.ResizeToFitContents();

            if ((padding.Width > 0.0) || (padding.Height > 0.0))
            {
                // if there is any additional padding requested
                // we need to further handle the page

                // first determine the desired page size including the padding
                // and set the new size

                var old_size = VA.Pages.PageHelper.GetSize(page);
                var new_size = old_size + padding.Multiply(2, 2);
                SetSize(page, new_size);

                // The page has the correct size, but
                // the contents will be offset from the correct location
                page.CenterDrawing();
            }
        }
Example #2
0
 private VA.Drawing.Size ToMGCoordinates(VA.Drawing.Size s)
 {
     return(s.Multiply(this.ScaleToMsagl, this.ScaleToMsagl));
 }
Example #3
0
 private VA.Drawing.Size ToMSAGLCoordinates(VA.Drawing.Size s)
 {
     return(s.Multiply(ScaleToMSAGL, ScaleToMSAGL));
 }