public Node <T> AddNewChild(Geometry.Size size) { var new_child = new Node <T>(Node <T> ._nodeSeqNum++, null, size); this.add_child(new_child); return(new_child); }
public Drawing_Surface(Geometry.Size sz) { mDisplay = Display.Impl as Drawing_Display; mImage = new Bitmap(sz.Width, sz.Height); System.Diagnostics.Debug.Assert(mImage != null); }
internal static void SetSize(IVisio.Page page, Geometry.Size size) { var writer = new VASS.Writers.SrcWriter(); writer.SetValue(VASS.SrcConstants.PageWidth, size.Width); writer.SetValue(VASS.SrcConstants.PageHeight, size.Height); writer.Commit(page.PageSheet, VASS.CellValueType.Formula); }
public FormPage() { this.Size = new Geometry.Size(8.5, 11); this.PageMargin = new PageMargin(0.5, 0.5, 0.5, 0.5); this.DefaultFont = "Segoe UI"; this.BodyTextSize = 8.0; this.BodyParaSpacingAfter = 0.0; this.TitleTextSize = 15.0; }
internal static void SetSize(IVisio.Page page, Geometry.Size size) { var writer = new VisioAutomation.ShapeSheet.Writers.SrcWriter(); writer.SetFormula(VisioAutomation.ShapeSheet.SrcConstants.PageWidth, size.Width); writer.SetFormula(VisioAutomation.ShapeSheet.SrcConstants.PageHeight, size.Height); writer.Commit(page.PageSheet); }
public TextBlock(Geometry.Size size, string text) { this.Text = text; this.Size = size; this.TextBlockCells = new VisioAutomation.Text.TextBlockCells(); this.ParagraphFormatCells = new VisioAutomation.Text.ParagraphFormatCells(); this.FormatCells = new Shapes.ShapeFormatCells(); this.CharacterFormatCells = new VisioAutomation.Text.CharacterFormatCells(); }
internal void init(int id, Node <T> parent, Geometry.Size size, T data) { this.Id = id; this.Size = size; this.Data = data; this.Parent = parent; this._child_list = new List <Node <T> >(); this.left_neighbor = null; this.right_neighbor = null; this.Position = new Geometry.Point(0, 0); this._is_collapsed = false; }
internal static Geometry.Size GetSize(IVisio.Page page) { var query = new CellQuery(); var col_height = query.Columns.Add(ShapeSheet.SrcConstants.PageHeight, nameof(ShapeSheet.SrcConstants.PageHeight)); var col_width = query.Columns.Add(ShapeSheet.SrcConstants.PageWidth, nameof(ShapeSheet.SrcConstants.PageWidth)); var results = query.GetResults <double>(page.PageSheet); double height = results.Cells[col_height]; double width = results.Cells[col_width]; var s = new Geometry.Size(width, height); return(s); }
public static Geometry.Size GetSize(IVisio.Page page) { var query = new VASS.Query.CellQuery(); var col_height = query.Columns.Add(VASS.SrcConstants.PageHeight, nameof(VASS.SrcConstants.PageHeight)); var col_width = query.Columns.Add(VASS.SrcConstants.PageWidth, nameof(VASS.SrcConstants.PageWidth)); var cellqueryresult = query.GetResults <double>(page.PageSheet); var row = cellqueryresult[0]; double height = row[col_height]; double width = row[col_width]; var s = new Geometry.Size(width, height); return(s); }
public GridLayout(int cols, int rows, Geometry.Size cellsize, IVisio.Master master) { this.ColumnDirection = ColumnDirection.LeftToRight; this.RowDirection = RowDirection.BottomToTop; this.CellSpacing = new Geometry.Size(0.5, 0.25); this.ColumnCount = cols; this.RowCount = rows; // initialize the sizes for the rows and columns this.Rows = new List <Row>(this.RowCount); foreach (int row in Enumerable.Range(0, this.RowCount)) { var r = new Row(); r.Height = cellsize.Height; this.Rows.Add(r); } this.Columns = new List <Column>(this.ColumnCount); foreach (int col in Enumerable.Range(0, this.ColumnCount)) { var c = new Column(); c.Width = cellsize.Width; this.Columns.Add(c); } // Create the nodes this._nodes = new Node[this.RowCount, this.ColumnCount]; foreach (int row in Enumerable.Range(0, this.RowCount)) { foreach (int col in Enumerable.Range(0, this.ColumnCount)) { var node = new Node(); node.Column = col; node.Row = row; node.Master = master; node.Draw = true; this._nodes[row, col] = node; } } }
public static void ResizeToFitContents(IVisio.Page page, Geometry.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 = VisioAutomation.Pages.PageHelper.GetSize(page); var new_size = old_size + padding.Multiply(2, 2); VisioAutomation.Pages.PageHelper.SetSize(page, new_size); // The page has the correct size, but // the contents will be offset from the correct location page.CenterDrawing(); } }
public override SurfaceImpl CreateSurface(Geometry.Size surfaceSize) { return(new Drawing_Surface(surfaceSize)); }
public Node(Geometry.Size size, T data) { this.init(Node <T> ._nodeSeqNum++, null, size, data); }
internal Node(int id, Node <T> parent, Geometry.Size size) { this.init(id, parent, size, default(T)); }
protected Box(Geometry.Size s) { this.Size = s; }
private void AdjustInsertionPoint(Geometry.Size size) { this.InsertionPoint = this.InsertionPoint.Add(size.Width, 0); this._current_line_height = System.Math.Max(this._current_line_height, size.Height); }
public static void ResizeToFitContents(this IVisio.Page page, Geometry.Size padding) { Pages.PageHelper.ResizeToFitContents(page, padding); }
protected LayoutBase() { this.AvenueSize = new Geometry.Size(0.375, 0.375); }