public class

DrawingUtils

extends Object
java.lang.Object
   ↳ com.pdftron.pdf.utils.DrawingUtils

Summary

Constants
int sSelectionBoxMargin
Public Constructors
DrawingUtils()
Public Methods
static void calcArrow(PointF pt1, PointF pt2, PointF pt3, PointF pt4, float thickness, double zoom)
static void calcRuler(PointF pt1, PointF pt2, PointF pt3, PointF pt4, PointF pt5, PointF pt6, float thickness, double zoom)
static double distance(PointF p1, PointF p2)
static void drawArrow(Canvas canvas, PointF pt1, PointF pt2, PointF pt3, PointF pt4, Path path, Paint paint)
static void drawCloud(PDFViewCtrl pdfViewCtrl, int pageNum, Canvas canvas, ArrayList<PointF> canvasPoints, Path path, Paint paint, int strokeColor, Paint fillPaint, int fillColor, double borderIntensity)
static void drawCtrlPts(Resources resources, Canvas canvas, Paint paint, PointF pt1, PointF pt2, PointF midH, PointF midV, float radius, boolean hasPermission, boolean maintainAspectRatio)
static void drawCtrlPtsAdvancedShape(Resources resources, Canvas canvas, Paint paint, PointF[] ctrlPts, float radius, boolean hasPermission, boolean skipEndPoint)
static void drawCtrlPtsLine(Resources resources, Canvas canvas, Paint paint, PointF pt1, PointF pt2, float radius, boolean hasPermission)
static void drawGuideline(AnnotView.SnapMode snapMode, float extend, Canvas canvas, RectF bbox, Path path, Paint paint)
static void drawGuideline(int degree, float radius, Canvas canvas, RectF bbox, Path path, Paint paint)
Degree in counter-clockwise
static void drawInk(PDFViewCtrl pdfViewCtrl, Canvas canvas, ArrayList<InkItem> inks, Matrix transform, PointF offset)
static void drawLine(Canvas canvas, PointF pt1, PointF pt2, Paint paint)
static void drawOval(Canvas canvas, PointF pt1, PointF pt2, float thicknessDraw, RectF oval, int fillColor, int strokeColor, Paint fillPaint, Paint paint)
static void drawPolygon(PDFViewCtrl pdfViewCtrl, int pageNum, Canvas canvas, ArrayList<PointF> canvasPoints, Path path, Paint paint, int strokeColor, Paint fillPaint, int fillColor, Matrix transform)
static void drawPolygon(PDFViewCtrl pdfViewCtrl, int pageNum, Canvas canvas, ArrayList<PointF> canvasPoints, Path path, Paint paint, int strokeColor, Paint fillPaint, int fillColor)
static void drawPolyline(PDFViewCtrl pdfViewCtrl, int pageNum, Canvas canvas, ArrayList<PointF> canvasPoints, Path path, Paint paint, int strokeColor)
static void drawRectangle(Canvas canvas, PointF pt1, PointF pt2, float thicknessDraw, int fillColor, int strokeColor, Paint fillPaint, Paint paint)
static void drawRuler(Canvas canvas, PointF pt1, PointF pt2, PointF pt3, PointF pt4, PointF pt5, PointF pt6, Path path, Paint paint, String text, double zoom)
static void drawSelectionBox(Paint paint, Context context, Canvas canvas, float left, float top, float right, float bottom, boolean hasSelectionPermission)
Draws the annotation selection box.
static PointF midpoint(PointF pt1, PointF pt2)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int sSelectionBoxMargin

Constant Value: 16 (0x00000010)

Public Constructors

public DrawingUtils ()

Public Methods

public static void calcArrow (PointF pt1, PointF pt2, PointF pt3, PointF pt4, float thickness, double zoom)

public static void calcRuler (PointF pt1, PointF pt2, PointF pt3, PointF pt4, PointF pt5, PointF pt6, float thickness, double zoom)

public static double distance (PointF p1, PointF p2)

public static void drawArrow (Canvas canvas, PointF pt1, PointF pt2, PointF pt3, PointF pt4, Path path, Paint paint)

public static void drawCloud (PDFViewCtrl pdfViewCtrl, int pageNum, Canvas canvas, ArrayList<PointF> canvasPoints, Path path, Paint paint, int strokeColor, Paint fillPaint, int fillColor, double borderIntensity)

public static void drawCtrlPts (Resources resources, Canvas canvas, Paint paint, PointF pt1, PointF pt2, PointF midH, PointF midV, float radius, boolean hasPermission, boolean maintainAspectRatio)

public static void drawCtrlPtsAdvancedShape (Resources resources, Canvas canvas, Paint paint, PointF[] ctrlPts, float radius, boolean hasPermission, boolean skipEndPoint)

public static void drawCtrlPtsLine (Resources resources, Canvas canvas, Paint paint, PointF pt1, PointF pt2, float radius, boolean hasPermission)

public static void drawGuideline (AnnotView.SnapMode snapMode, float extend, Canvas canvas, RectF bbox, Path path, Paint paint)

public static void drawGuideline (int degree, float radius, Canvas canvas, RectF bbox, Path path, Paint paint)

Degree in counter-clockwise

public static void drawInk (PDFViewCtrl pdfViewCtrl, Canvas canvas, ArrayList<InkItem> inks, Matrix transform, PointF offset)

public static void drawLine (Canvas canvas, PointF pt1, PointF pt2, Paint paint)

public static void drawOval (Canvas canvas, PointF pt1, PointF pt2, float thicknessDraw, RectF oval, int fillColor, int strokeColor, Paint fillPaint, Paint paint)

public static void drawPolygon (PDFViewCtrl pdfViewCtrl, int pageNum, Canvas canvas, ArrayList<PointF> canvasPoints, Path path, Paint paint, int strokeColor, Paint fillPaint, int fillColor, Matrix transform)

public static void drawPolygon (PDFViewCtrl pdfViewCtrl, int pageNum, Canvas canvas, ArrayList<PointF> canvasPoints, Path path, Paint paint, int strokeColor, Paint fillPaint, int fillColor)

public static void drawPolyline (PDFViewCtrl pdfViewCtrl, int pageNum, Canvas canvas, ArrayList<PointF> canvasPoints, Path path, Paint paint, int strokeColor)

public static void drawRectangle (Canvas canvas, PointF pt1, PointF pt2, float thicknessDraw, int fillColor, int strokeColor, Paint fillPaint, Paint paint)

public static void drawRuler (Canvas canvas, PointF pt1, PointF pt2, PointF pt3, PointF pt4, PointF pt5, PointF pt6, Path path, Paint paint, String text, double zoom)

public static void drawSelectionBox (Paint paint, Context context, Canvas canvas, float left, float top, float right, float bottom, boolean hasSelectionPermission)

Draws the annotation selection box. Color and style of the box depends on whether selection permission is granted. If permission granted, draws a blue rectangle with no padding, otherwise draw a red dashed rectangle with padding.

Parameters
canvas to draw the box
left The left side of the rectangle to be drawn
top The top side of the rectangle to be drawn
right The right side of the rectangle to be drawn
bottom The bottom side of the rectangle to be drawn

public static PointF midpoint (PointF pt1, PointF pt2)