public SizeF LineLayout()
        {
            GDFPage page   = this.CurrentPage;
            SizeF   layout = new SizeF(page.Bounds.Right - page.Location.X, page.Bounds.Bottom - page.Location.Y);

            return(layout);
        }
        public void NewLine()
        {
            GDFPage page       = this.CurrentPage;
            float   lineheight = page.LastLineHeight == 0 ? this.DefaultLineHeight : page.LastLineHeight;

            if ((page.Location.Y + lineheight * 2) < page.PageSize.Height)
            {
                page.BottomRight = new PointF(Math.Max(page.BottomRight.X, page.Location.X), Math.Max(page.BottomRight.Y, page.Location.Y + lineheight));
                page.Location    = new PointF(page.Bounds.Left, page.Location.Y + lineheight);

                page.LastLineHeight = 0;
            }
            else
            {
                RectangleF rec = page.Bounds;

                this._index++;
                rec.Location = new PointF(page.Bounds.X, this.CurrentPage.Bounds.Top);
                rec.Height   = this.CurrentPage.Bounds.Height;

                this.CurrentPage.Bounds      = rec;
                this.CurrentPage.Location    = new PointF(rec.Left, rec.Top);
                this.CurrentPage.BottomRight = new PointF(Math.Max(this.CurrentPage.BottomRight.X, rec.Left), Math.Max(this.CurrentPage.BottomRight.Y, this.CurrentPage.Location.Y));
            }
        }
Exemplo n.º 3
0
 public GDFCell(GDFRow row, RectangleF initCellBounds)
 {
     this._row = row;
     //Store page
     this._page = this._row.Builder.Manager.CurrentPage;
     //Set Bounds and Location
     this._page.Location = initCellBounds.Location;
     this._page.Bounds = initCellBounds;
 }
Exemplo n.º 4
0
 public GDFCell(GDFRow row, RectangleF initCellBounds)
 {
     this._row = row;
     //Store page
     this._page = this._row.Builder.Manager.CurrentPage;
     //Set Bounds and Location
     this._page.Location = initCellBounds.Location;
     this._page.Bounds   = initCellBounds;
 }
        private void bindingsource_DataSourceChanged(object sender, EventArgs e)
        {
            GDFPage page = this.bindingNavigator1.BindingSource.Current as GDFPage;

            if (page != null)
            {
                this.pictureBox1.Size  = page.PageImage.Size;
                this.pictureBox1.Image = page.PageImage;
            }
        }
        public void MoveLocationRight(SizeF size)
        {
            GDFPage page = this.CurrentPage;

            page.Location       = new PointF(page.Location.X + size.Width, page.Location.Y);
            page.LastLineHeight = Math.Max(page.LastLineHeight, size.Height);
            //page.BottomRight = new PointF(Math.Max(page.BottomRight.X, page.Location.X + page.Bounds.Left ),
            //    Math.Max(page.BottomRight.Y, page.Bounds.Top + page.Location.Y + page.LastLineHeight));

            page.BottomRight = new PointF(Math.Max(page.BottomRight.X, page.Location.X), Math.Max(page.BottomRight.Y, page.Location.Y + page.LastLineHeight));
        }
        public void NewFlowLine(SizeF size)
        {
            GDFPage page = this.CurrentPage;

            if ((page.Location.Y + size.Height * 2) < page.PageSize.Height)
            {
                page.LastLineHeight = 0;
                page.BottomRight    = new PointF(Math.Max(page.BottomRight.X, page.Location.X + size.Width), Math.Max(page.BottomRight.Y, page.Location.Y + size.Height));
                page.Location       = new PointF(page.Bounds.Left, page.Location.Y + size.Height);
            }
            else
            {
                page.BottomRight = new PointF(Math.Max(page.BottomRight.X, page.Location.X + size.Width), Math.Max(page.BottomRight.Y, page.Location.Y + size.Height));
                RectangleF rec = page.Bounds;
                this._index++;
                rec.Location                 = new PointF(page.Bounds.X, this.CurrentPage.Bounds.Top);
                rec.Height                   = this.CurrentPage.Bounds.Height;
                this.CurrentPage.Bounds      = rec;
                this.CurrentPage.Location    = new PointF(rec.Left, rec.Top);
                this.CurrentPage.BottomRight = new PointF(Math.Max(this.CurrentPage.BottomRight.X, this.CurrentPage.Location.X),
                                                          Math.Max(this.CurrentPage.BottomRight.Y, this.CurrentPage.Location.Y));
            }
        }