Skip to content

Commit 175750c

Browse files
committed
PDFBOX-3353: make circles slightly smaller to avoid outside flatness in PDFBox rendering
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1923664 13f79535-47bb-0310-9956-ffa450edef68
1 parent 810e2b8 commit 175750c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/PDTextAppearanceHandler.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ private void drawCircles(PDAnnotationText annotation, final PDAppearanceContentS
232232
float smallR = 6.36f;
233233
float largeR = 9.756f;
234234

235+
// adjustments because the bottom of the circle is flat
236+
contentStream.transform(Matrix.getScaleInstance(0.95f, 0.95f));
237+
contentStream.transform(Matrix.getTranslateInstance(0, 0.5f));
238+
235239
contentStream.setMiterLimit(4);
236240
contentStream.setLineJoinStyle(1);
237241
contentStream.setLineCapStyle(0);

0 commit comments

Comments
 (0)