Example #1
0
 public override void Draw(Gfx gfx)
 {
     base.Draw(gfx);
     MainVerticalStack.SetPosition(X, Y);
     MainVerticalStack.Width = Width;
     MainVerticalStack.Draw(gfx);
 }
Example #2
0
        public void Stack()
        {
            PdfDocument document = new PdfDocument();
            PdfPage     page     = document.AddPage();

            XGraphics gfx    = XGraphics.FromPdfPage(page);
            Gfx       gfx2   = new Gfx(gfx);
            Estilo    estilo = new Estilo();

            LinhaCampos stack = new LinhaCampos(estilo, 100);

            stack.Height = Constantes.CampoAltura;



            stack.ComCampo("Data", "Data")
            .ComCampo("Recebedor", "Recebedor")
            .ComLarguras(30, 0);


            VerticalStack pilha2 = new VerticalStack();

            pilha2.Width = 100;
            //   pilha2.Height = 2 * Constantes.CampoAltura;

            pilha2.SetPosition(10, 10);

            pilha2.Add(new Campo("Topo", "w", estilo));
            pilha2.Add(stack);

            pilha2.Draw(gfx2);

            pilha2.Y     = pilha2.BoundingBox.Bottom;
            pilha2.Width = 150;
            pilha2.Draw(gfx2);

            pilha2.Y     = pilha2.BoundingBox.Bottom;
            pilha2.Width = 100;
            pilha2.Draw(gfx2);

            document.Save("Pilha.pdf");
        }