Class PDFGraphicsStreamEngine

  • Direct Known Subclasses:
    PageDrawer

    public abstract class PDFGraphicsStreamEngine
    extends PDFStreamEngine
    PDFStreamEngine subclass for advanced processing of graphics. This class should be subclasses by end users looking to hook into graphics operations.
    • Constructor Detail

      • PDFGraphicsStreamEngine

        protected PDFGraphicsStreamEngine​(PDPage page)
        Constructor.
    • Method Detail

      • getPage

        protected final PDPage getPage()
        Returns the page.
      • appendRectangle

        public abstract void appendRectangle​(android.graphics.PointF p0,
                                             android.graphics.PointF p1,
                                             android.graphics.PointF p2,
                                             android.graphics.PointF p3)
                                      throws IOException
        Append a rectangle to the current path.
        Throws:
        IOException
      • drawImage

        public abstract void drawImage​(PDImage pdImage)
                                throws IOException
        Draw the image.
        Parameters:
        pdImage - The image to draw.
        Throws:
        IOException
      • clip

        public abstract void clip​(android.graphics.Path.FillType windingRule)
                           throws IOException
        Modify the current clipping path by intersecting it with the current path. The clipping path will not be updated until the succeeding painting operator is called.
        Parameters:
        windingRule - The winding rule which will be used for clipping.
        Throws:
        IOException
      • moveTo

        public abstract void moveTo​(float x,
                                    float y)
                             throws IOException
        Starts a new path at (x,y).
        Throws:
        IOException
      • lineTo

        public abstract void lineTo​(float x,
                                    float y)
                             throws IOException
        Draws a line from the current point to (x,y).
        Throws:
        IOException
      • curveTo

        public abstract void curveTo​(float x1,
                                     float y1,
                                     float x2,
                                     float y2,
                                     float x3,
                                     float y3)
                              throws IOException
        Draws a curve from the current point to (x3,y3) using (x1,y1) and (x2,y2) as control points.
        Throws:
        IOException
      • getCurrentPoint

        public abstract android.graphics.PointF getCurrentPoint()
                                                         throws IOException
        Returns the current point of the current path.
        Throws:
        IOException
      • closePath

        public abstract void closePath()
                                throws IOException
        Closes the current path.
        Throws:
        IOException
      • endPath

        public abstract void endPath()
                              throws IOException
        Ends the current path without filling or stroking it. The clipping path is updated here.
        Throws:
        IOException
      • strokePath

        public abstract void strokePath()
                                 throws IOException
        Stroke the path.
        Throws:
        IOException - If there is an IO error while stroking the path.
      • fillPath

        public abstract void fillPath​(android.graphics.Path.FillType windingRule)
                               throws IOException
        Fill the path.
        Parameters:
        windingRule - The winding rule this path will use.
        Throws:
        IOException
      • fillAndStrokePath

        public abstract void fillAndStrokePath​(android.graphics.Path.FillType windingRule)
                                        throws IOException
        Fills and then strokes the path.
        Parameters:
        windingRule - The winding rule this path will use.
        Throws:
        IOException
      • shadingFill

        public abstract void shadingFill​(COSName shadingName)
                                  throws IOException
        Fill with Shading.
        Parameters:
        shadingName - The name of the Shading Dictionary to use for this fill instruction.
        Throws:
        IOException