Class DrawingUtil

java.lang.Object
com.itextpdf.forms.util.DrawingUtil

public class DrawingUtil extends Object
Utility class to draw form fields PdfFormField.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final String
     
    protected static final String
     
    protected static final String
     
    protected static final String
     
    protected static final String
     
    protected static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    drawCircle(PdfCanvas canvas, float centerX, float centerY, float radius)
    Draws a circle with the specified radius.
    static void
    drawCross(PdfCanvas canvas, float width, float height, float borderWidth)
    Draws a cross with the specified width and height.
    static void
    drawPdfACheck(PdfCanvas canvas, float width, float height)
    Draws a PDF A compliant check mark in the specified rectangle.
    static void
    drawPdfACheck(PdfCanvas canvas, float width, float height, float moveX, float moveY)
    Draws a PDF A compliant check mark in the specified rectangle.
    static void
    drawPdfACircle(PdfCanvas canvas, float width, float height)
    Draws a PDF A compliant circle in the specified rectangle.
    static void
    drawPdfACircle(PdfCanvas canvas, float width, float height, float moveX, float moveY)
    Draws a PDF A compliant circle in the specified rectangle.
    static void
    drawPdfACross(PdfCanvas canvas, float width, float height)
    Draws a PDF A compliant cross in the specified rectangle.
    static void
    drawPdfACross(PdfCanvas canvas, float width, float height, float moveX, float moveY)
    Draws a PDF A compliant cross in the specified rectangle.
    static void
    drawPdfADiamond(PdfCanvas canvas, float width, float height)
    Draws a PDF A compliant diamond in the specified rectangle.
    static void
    drawPdfADiamond(PdfCanvas canvas, float width, float height, float moveX, float moveY)
    Draws a PDF A compliant diamond in the specified rectangle.
    static void
    drawPdfASquare(PdfCanvas canvas, float width, float height)
    Draws a PDF A compliant square in the specified rectangle.
    static void
    drawPdfASquare(PdfCanvas canvas, float width, float height, float moveX, float moveY)
    Draws a PDF A compliant square in the specified rectangle.
    static void
    drawPdfAStar(PdfCanvas canvas, float width, float height)
    Draws a PDF A compliant star in the specified rectangle.
    static void
    drawPdfAStar(PdfCanvas canvas, float width, float height, float moveX, float moveY)
    Draws a PDF A compliant star in the specified rectangle.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • DrawingUtil

      public DrawingUtil()
  • Method Details

    • drawPdfACheck

      public static void drawPdfACheck (PdfCanvas canvas, float width, float height, float moveX, float moveY)
      Draws a PDF A compliant check mark in the specified rectangle.
      Parameters:
      canvas - the canvas to draw on
      width - the width of the rectangle
      height - the height of the rectangle
      moveX - the x coordinate of the bottom left corner of the rectangle
      moveY - the y coordinate of the bottom left corner of the rectangle
    • drawPdfACheck

      public static void drawPdfACheck (PdfCanvas canvas, float width, float height)
      Draws a PDF A compliant check mark in the specified rectangle.
      Parameters:
      canvas - the canvas to draw on
      width - the width of the rectangle
      height - the height of the rectangle
    • drawPdfACircle

      public static void drawPdfACircle (PdfCanvas canvas, float width, float height, float moveX, float moveY)
      Draws a PDF A compliant circle in the specified rectangle.
      Parameters:
      canvas - the canvas to draw on
      width - the width of the rectangle
      height - the height of the rectangle
      moveX - the x coordinate of the bottom left corner of the rectangle
      moveY - the y coordinate of the bottom left corner of the rectangle
    • drawPdfACircle

      public static void drawPdfACircle (PdfCanvas canvas, float width, float height)
      Draws a PDF A compliant circle in the specified rectangle.
      Parameters:
      canvas - the canvas to draw on
      width - the width of the rectangle
      height - the height of the rectangle
    • drawPdfACross

      public static void drawPdfACross (PdfCanvas canvas, float width, float height, float moveX, float moveY)
      Draws a PDF A compliant cross in the specified rectangle.
      Parameters:
      canvas - the canvas to draw on
      width - the width of the rectangle
      height - the height of the rectangle
      moveX - the x coordinate of the bottom left corner of the rectangle
      moveY - the y coordinate of the bottom left corner of the rectangle
    • drawPdfACross

      public static void drawPdfACross (PdfCanvas canvas, float width, float height)
      Draws a PDF A compliant cross in the specified rectangle.
      Parameters:
      canvas - the canvas to draw on
      width - the width of the rectangle
      height - the height of the rectangle
    • drawPdfADiamond

      public static void drawPdfADiamond (PdfCanvas canvas, float width, float height, float moveX, float moveY)
      Draws a PDF A compliant diamond in the specified rectangle.
      Parameters:
      canvas - the canvas to draw on
      width - the width of the rectangle
      height - the height of the rectangle
      moveX - the x coordinate of the bottom left corner of the rectangle
      moveY - the y coordinate of the bottom left corner of the rectangle
    • drawPdfADiamond

      public static void drawPdfADiamond (PdfCanvas canvas, float width, float height)
      Draws a PDF A compliant diamond in the specified rectangle.
      Parameters:
      canvas - the canvas to draw on
      width - the width of the rectangle
      height - the height of the rectangle
    • drawPdfASquare

      public static void drawPdfASquare (PdfCanvas canvas, float width, float height, float moveX, float moveY)
      Draws a PDF A compliant square in the specified rectangle.
      Parameters:
      canvas - the canvas to draw on
      width - the width of the rectangle
      height - the height of the rectangle
      moveX - the x coordinate of the bottom left corner of the rectangle
      moveY - the y coordinate of the bottom left corner of the rectangle
    • drawPdfASquare

      public static void drawPdfASquare (PdfCanvas canvas, float width, float height)
      Draws a PDF A compliant square in the specified rectangle.
      Parameters:
      canvas - the canvas to draw on
      width - the width of the rectangle
      height - the height of the rectangle
    • drawPdfAStar

      public static void drawPdfAStar (PdfCanvas canvas, float width, float height, float moveX, float moveY)
      Draws a PDF A compliant star in the specified rectangle.
      Parameters:
      canvas - the canvas to draw on
      width - the width of the rectangle
      height - the height of the rectangle
      moveX - the x coordinate of the bottom left corner of the rectangle
      moveY - the y coordinate of the bottom left corner of the rectangle
    • drawPdfAStar

      public static void drawPdfAStar (PdfCanvas canvas, float width, float height)
      Draws a PDF A compliant star in the specified rectangle.
      Parameters:
      canvas - the canvas to draw on
      width - the width of the rectangle
      height - the height of the rectangle
    • drawCross

      public static void drawCross (PdfCanvas canvas, float width, float height, float borderWidth)
      Draws a cross with the specified width and height.
      Parameters:
      canvas - the canvas to draw on
      width - the width of the rectangle
      height - the height of the rectangle
      borderWidth - the width of the border
    • drawCircle

      public static void drawCircle (PdfCanvas canvas, float centerX, float centerY, float radius)
      Draws a circle with the specified radius.
      Parameters:
      canvas - the canvas to draw on
      centerX - the x coordinate of the center of the circle
      centerY - the y coordinate of the center of the circle
      radius - the radius of the circle