public class

DrawingUtils

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

Summary

Nested Classes
class DrawingUtils.LineEndingCalculationVariables  
Constants
int sSelectionBoxMargin
Public Constructors
DrawingUtils()
Public Methods
static void calButt(PointF pt1, PointF pt2, DrawingUtils.LineEndingCalculationVariables cv)
static void calcCircle(PointF pt1, PointF pt2, PointF pt3, DrawingUtils.LineEndingCalculationVariables cv)
static void calcClosedArrow(PointF pt1, PointF pt2, PointF pt3, DrawingUtils.LineEndingCalculationVariables cv)
static void calcDiamond(PointF pt1, PointF pt2, PointF pt3, PointF pt4, DrawingUtils.LineEndingCalculationVariables cv)
static void calcOpenArrow(PointF pt1, PointF pt2, PointF pt3, DrawingUtils.LineEndingCalculationVariables cv)
static void calcRClosedArrow(PointF pt1, PointF pt2, PointF pt3, DrawingUtils.LineEndingCalculationVariables cv)
static void calcROpenArrow(PointF pt1, PointF pt2, PointF pt3, DrawingUtils.LineEndingCalculationVariables cv)
static void calcSlash(PointF pt1, PointF pt2, DrawingUtils.LineEndingCalculationVariables cv)
static void calcSquare(PointF pt1, PointF pt2, DrawingUtils.LineEndingCalculationVariables cv)
static double distance(PointF p1, PointF p2)
static void drawArrow(Canvas canvas, PointF startPoint, PointF endPoint, PointF ept1, PointF ept2, Path path, Paint paint, PathEffect linePathEffect)
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 drawCloudyPolygon(PDFViewCtrl pdfViewCtrl, int pageNum, Canvas canvas, ArrayList<PointF> canvasPoints, Path path, Paint paint, int strokeColor, Paint fillPaint, int fillColor, double borderIntensity)
static void drawCloudyRect(PDFViewCtrl pdfViewCtrl, int pageNum, Canvas canvas, ArrayList<PointF> canvasPoints, Path path, Paint paint, int strokeColor, Paint fillPaint, int fillColor, double borderIntensity)
static void drawCloudyRectangle(PDFViewCtrl pdfViewCtrl, int pageNumber, Canvas canvas, Path path, PointF pt1, PointF pt2, int fillColor, int strokeColor, Paint fillPaint, Paint paint, 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(int degree, float radius, Canvas canvas, RectF bbox, Path path, Paint paint)
Degree in counter-clockwise
static void drawGuideline(Canvas canvas, Path path, float startX, float startY, float stopX, float stopY, Paint paint)
static void drawGuideline(AnnotView.SnapMode snapMode, float extend, Canvas canvas, RectF bbox, Path path, Paint paint)
static void drawInk(PDFViewCtrl pdfViewCtrl, Canvas canvas, ArrayList<InkItem> inks, Matrix transform, PointF offset)
static void drawLine(Canvas canvas, PointF pt1, PointF pt2, PointF startPt, PointF endPt, PointF spt1, PointF spt2, PointF spt3, PointF spt4, PointF ept1, PointF ept2, PointF ept3, PointF ept4, LineEndingStyle startStyle, LineEndingStyle endStyle, Path path, Paint paint, PathEffect linePathEffect, float thickness, double zoom)
static void drawOval(Canvas canvas, PointF pt1, PointF pt2, float thicknessDraw, RectF oval, int fillColor, int strokeColor, Paint fillPaint, Paint paint, PathEffect borderPathEffect)
static void drawPolygon(PDFViewCtrl pdfViewCtrl, int pageNum, Canvas canvas, ArrayList<PointF> canvasPoints, Path path, Paint paint, int strokeColor, Paint fillPaint, int fillColor, Matrix transform, PathEffect borderPathEffect)
static void drawPolygon(PDFViewCtrl pdfViewCtrl, int pageNum, Canvas canvas, ArrayList<PointF> canvasPoints, Path path, Paint paint, int strokeColor, Paint fillPaint, int fillColor, PathEffect borderPathEffect)
static void drawPolyline(PDFViewCtrl pdfViewCtrl, int pageNum, Canvas canvas, ArrayList<PointF> canvasPoints, PointF pt1, PointF pt2, PointF pt3, PointF pt4, PointF spt1, PointF spt2, PointF spt3, PointF spt4, PointF ept1, PointF ept2, PointF ept3, PointF ept4, LineEndingStyle startStyle, LineEndingStyle endStyle, Path path, Paint paint, int strokeColor, PathEffect linePathEffect, float thickness, double zoom)
static void drawRectangle(Canvas canvas, PointF pt1, PointF pt2, float thicknessDraw, int fillColor, int strokeColor, Paint fillPaint, Paint paint, PathEffect borderPathEffect)
static void drawRuler(Canvas canvas, PointF pt1, PointF pt2, PointF startPt, PointF endPt, PointF spt1, PointF spt2, PointF spt3, PointF spt4, PointF ept1, PointF ept2, PointF ept3, PointF ept4, LineEndingStyle startStyle, LineEndingStyle endStyle, String text, Path path, Paint paint, PathEffect linePathEffect, float thickness, 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 DashPathEffect getAnnotationPreviewDashPathEffect(Context context)
static DashPathEffect getDashPathEffect(Context context)
static double[] getShapesDashIntervals()
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 calButt (PointF pt1, PointF pt2, DrawingUtils.LineEndingCalculationVariables cv)

public static void calcCircle (PointF pt1, PointF pt2, PointF pt3, DrawingUtils.LineEndingCalculationVariables cv)

public static void calcClosedArrow (PointF pt1, PointF pt2, PointF pt3, DrawingUtils.LineEndingCalculationVariables cv)

public static void calcDiamond (PointF pt1, PointF pt2, PointF pt3, PointF pt4, DrawingUtils.LineEndingCalculationVariables cv)

public static void calcOpenArrow (PointF pt1, PointF pt2, PointF pt3, DrawingUtils.LineEndingCalculationVariables cv)

public static void calcRClosedArrow (PointF pt1, PointF pt2, PointF pt3, DrawingUtils.LineEndingCalculationVariables cv)

public static void calcROpenArrow (PointF pt1, PointF pt2, PointF pt3, DrawingUtils.LineEndingCalculationVariables cv)

public static void calcSlash (PointF pt1, PointF pt2, DrawingUtils.LineEndingCalculationVariables cv)

public static void calcSquare (PointF pt1, PointF pt2, DrawingUtils.LineEndingCalculationVariables cv)

public static double distance (PointF p1, PointF p2)

public static void drawArrow (Canvas canvas, PointF startPoint, PointF endPoint, PointF ept1, PointF ept2, Path path, Paint paint, PathEffect linePathEffect)

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 drawCloudyPolygon (PDFViewCtrl pdfViewCtrl, int pageNum, Canvas canvas, ArrayList<PointF> canvasPoints, Path path, Paint paint, int strokeColor, Paint fillPaint, int fillColor, double borderIntensity)

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

public static void drawCloudyRectangle (PDFViewCtrl pdfViewCtrl, int pageNumber, Canvas canvas, Path path, PointF pt1, PointF pt2, int fillColor, int strokeColor, Paint fillPaint, Paint paint, 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 (int degree, float radius, Canvas canvas, RectF bbox, Path path, Paint paint)

Degree in counter-clockwise

public static void drawGuideline (Canvas canvas, Path path, float startX, float startY, float stopX, float stopY, Paint paint)

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

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, PointF startPt, PointF endPt, PointF spt1, PointF spt2, PointF spt3, PointF spt4, PointF ept1, PointF ept2, PointF ept3, PointF ept4, LineEndingStyle startStyle, LineEndingStyle endStyle, Path path, Paint paint, PathEffect linePathEffect, float thickness, double zoom)

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

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, PathEffect borderPathEffect)

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

public static void drawPolyline (PDFViewCtrl pdfViewCtrl, int pageNum, Canvas canvas, ArrayList<PointF> canvasPoints, PointF pt1, PointF pt2, PointF pt3, PointF pt4, PointF spt1, PointF spt2, PointF spt3, PointF spt4, PointF ept1, PointF ept2, PointF ept3, PointF ept4, LineEndingStyle startStyle, LineEndingStyle endStyle, Path path, Paint paint, int strokeColor, PathEffect linePathEffect, float thickness, double zoom)

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

public static void drawRuler (Canvas canvas, PointF pt1, PointF pt2, PointF startPt, PointF endPt, PointF spt1, PointF spt2, PointF spt3, PointF spt4, PointF ept1, PointF ept2, PointF ept3, PointF ept4, LineEndingStyle startStyle, LineEndingStyle endStyle, String text, Path path, Paint paint, PathEffect linePathEffect, float thickness, 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 DashPathEffect getAnnotationPreviewDashPathEffect (Context context)

public static DashPathEffect getDashPathEffect (Context context)

public static double[] getShapesDashIntervals ()

public static PointF midpoint (PointF pt1, PointF pt2)