Package com.lowagie.text.pdf

Examples of com.lowagie.text.pdf.PdfContentByte.lineTo()


                case PathIterator.SEG_CUBICTO:
                    cb.curveTo(coords[0], coords[1], coords[2], coords[3], coords[4], coords[5]);
                    break;
                   
                case PathIterator.SEG_LINETO:
                    cb.lineTo(coords[0], coords[1]);
                    break;
                   
                case PathIterator.SEG_MOVETO:
                    cb.moveTo(coords[0], coords[1]);
                    break;
View Full Code Here


          }
          cb.setRGBColorStroke(0xC0, 0xC0, 0xC0);
          cb.rectangle(x3 - 5f, y2[p] - 5f, x4 - x3 + 10f, y1[p] - y2[p] + 10f);
          for (float l = y1[p] - 19; l > y2[p]; l -= 16) {
            cb.moveTo(x3, l);
            cb.lineTo(x4, l);
          }
          cb.rectangle(x1 + dx, y2[p] + dy, rect.getWidth() * factor, rect.getHeight() * factor);
          cb.stroke();
          System.out.println("Processed page " + i);
          p++;
View Full Code Here

            PdfContentByte cb = writer.getDirectContent();
           
            // first we draw some lines to be able to visualize the text alignment functions
            cb.setLineWidth(0f);
            cb.moveTo(250, 500);
            cb.lineTo(250, 800);
            cb.moveTo(50, 700);
            cb.lineTo(400, 700);
            cb.moveTo(50, 650);
            cb.lineTo(400, 650);
            cb.moveTo(50, 600);
View Full Code Here

            // first we draw some lines to be able to visualize the text alignment functions
            cb.setLineWidth(0f);
            cb.moveTo(250, 500);
            cb.lineTo(250, 800);
            cb.moveTo(50, 700);
            cb.lineTo(400, 700);
            cb.moveTo(50, 650);
            cb.lineTo(400, 650);
            cb.moveTo(50, 600);
            cb.lineTo(400, 600);
            cb.stroke();
View Full Code Here

            cb.moveTo(250, 500);
            cb.lineTo(250, 800);
            cb.moveTo(50, 700);
            cb.lineTo(400, 700);
            cb.moveTo(50, 650);
            cb.lineTo(400, 650);
            cb.moveTo(50, 600);
            cb.lineTo(400, 600);
            cb.stroke();
           
            // we construct a font
View Full Code Here

            cb.moveTo(50, 700);
            cb.lineTo(400, 700);
            cb.moveTo(50, 650);
            cb.lineTo(400, 650);
            cb.moveTo(50, 600);
            cb.lineTo(400, 600);
            cb.stroke();
           
            // we construct a font
            BaseFont bf = BaseFont.createFont("c:\\windows\\fonts\\arialuni.ttf", BaseFont.IDENTITY_H, true);
            Font ft = new Font(bf, 12);
View Full Code Here

                float height = 400;
                float leading = 30;
                int maxLines = 6;
                for (int k = 0; k < maxLines; ++k) {
                    cb.moveTo(x - k * leading, y);
                    cb.lineTo(x - k * leading, y - height);
                }
                cb.rectangle(x, y, -leading * (maxLines - 1), -height);
                cb.stroke();
                int status;
                VerticalText vt = new VerticalText(cb);
View Full Code Here

            cb.setLineWidth(10f);
            // draw a rectangle
            cb.rectangle(100, 700, 100, 100);
            // add the diagonal
            cb.moveTo(100, 700);
            cb.lineTo(200, 800);
            // stroke the lines
            cb.stroke();
           
            // an example of some circles
            cb.setLineDash(3, 3, 0);
View Full Code Here

            cb.stroke();
           
            // example with colorfill
            cb.setRGBColorFillF(0f, 255f, 0f);
            cb.moveTo(100f, 200f);
            cb.lineTo(200f, 250f);
            cb.lineTo(400f, 150f);
            // because we change the fill color BEFORE we stroke the triangle
            // the color of the triangle will be red instead of green
            cb.setRGBColorFillF(255f, 0f, 0f);
            cb.closePathFillStroke();
View Full Code Here

           
            // example with colorfill
            cb.setRGBColorFillF(0f, 255f, 0f);
            cb.moveTo(100f, 200f);
            cb.lineTo(200f, 250f);
            cb.lineTo(400f, 150f);
            // because we change the fill color BEFORE we stroke the triangle
            // the color of the triangle will be red instead of green
            cb.setRGBColorFillF(255f, 0f, 0f);
            cb.closePathFillStroke();
           
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.