Class PageCanvas

  • All Implemented Interfaces:

    
    public class PageCanvas
    
                        

    Represents a canvas drawing to be merged onto another PDF page.

    • Constructor Detail

      • PageCanvas

        PageCanvas(Size pageSize, NewPage.OnDrawCanvasCallback callback, Matrix matrix)
        PDF page created from a Canvas holding all the draw calls.
        Parameters:
        pageSize - Canvas page size in PDF points.
        callback - An NewPage.OnDrawCanvasCallback that should be called to perform the drawing on the canvas.
        matrix - Custom transformation matrix for the drawn content, identity matrix means alignment on bottom left at coordinate (0,0).
    • Method Detail

      • getMatrix

        @NonNull() Matrix getMatrix()

        Returns a custom transformation matrix for the content.

        Returns:

        Custom transformation matrix for the content, identity matrix means alignment on bottom left at coordinate (0,0).

      • getPosition

        @Nullable() PagePosition getPosition()

        Returns the alignment of drawn content on the target page.

        Returns:

        Relative position of the drawn content on the target page.