@SuppressWarnings("BooleanMethodIsAlwaysInverted") private boolean placeAnnotation(AffineTransform transform, Shape linkShape, Rectangle2D targetArea, PDAnnotationLink annot) { annot.setRectangle(new PDRectangle((float) targetArea.getMinX(), (float) targetArea.getMinY(), (float) targetArea.getWidth(), (float) targetArea.getHeight())); if (linkShape != null) { float[] quadPoints = mapShapeToQuadPoints(transform, linkShape, targetArea); /* * Is this not an area shape? Then we can not setup quads - ignore this shape. */ if (quadPoints.length == 0) return false; annot.setQuadPoints(quadPoints); } return true; }
@SuppressWarnings("BooleanMethodIsAlwaysInverted") private boolean placeAnnotation(AffineTransform transform, Shape linkShape, Rectangle2D targetArea, PDAnnotationLink annot) { annot.setRectangle(new PDRectangle((float) targetArea.getMinX(), (float) targetArea.getMinY(), (float) targetArea.getWidth(), (float) targetArea.getHeight())); if (linkShape != null) { float[] quadPoints = mapShapeToQuadPoints(transform, linkShape, targetArea); /* * Is this not an area shape? Then we can not setup quads - ignore this shape. */ if (quadPoints.length == 0) return false; annot.setQuadPoints(quadPoints); } return true; }
@SuppressWarnings("BooleanMethodIsAlwaysInverted") private boolean placeAnnotation(AffineTransform transform, Shape linkShape, Rectangle2D targetArea, PDAnnotationLink annot) { annot.setRectangle(new PDRectangle((float) targetArea.getMinX(), (float) targetArea.getMinY(), (float) targetArea.getWidth(), (float) targetArea.getHeight())); if (linkShape != null) { float[] quadPoints = mapShapeToQuadPoints(transform, linkShape, targetArea); /* * Is this not an area shape? Then we can not setup quads - ignore this shape. */ if (quadPoints.length == 0) return false; annot.setQuadPoints(quadPoints); } return true; }