Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -527,13 +527,13 @@ PDRectangle handleBorderBox(PDAnnotationSquareCircle annotation, float lineWidth
float[] rectDifferences = annotation.getRectDifferences();
if (rectDifferences.length == 0)
{
borderBox = getPaddedRectangle(getRectangle(), lineWidth / 2);
PDRectangle rect = getRectangle();
borderBox = getPaddedRectangle(rect, lineWidth / 2);
// the differences rectangle
annotation.setRectDifferences(lineWidth / 2);
annotation.setRectangle(addRectDifferences(getRectangle(), annotation.getRectDifferences()));
annotation.setRectangle(addRectDifferences(rect, annotation.getRectDifferences()));
// when the normal appearance stream was generated BBox and Matrix have been set to the
// values of the original /Rect. As the /Rect was changed that needs to be adjusted too.
PDRectangle rect = getRectangle();
PDAppearanceStream appearanceStream = annotation.getNormalAppearanceStream();
AffineTransform transform =
AffineTransform.getTranslateInstance(-rect.getLowerLeftX(), -rect.getLowerLeftY());
Expand Down