Skip to content

Commit 40f7565

Browse files
committed
PDFBOX-5660: remove unused
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1923614 13f79535-47bb-0310-9956-ffa450edef68
1 parent a7d0acf commit 40f7565

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

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

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,13 @@
2020
import java.io.IOException;
2121
import org.apache.logging.log4j.Logger;
2222
import org.apache.logging.log4j.LogManager;
23-
import org.apache.pdfbox.cos.COSArray;
24-
import org.apache.pdfbox.cos.COSBase;
25-
import org.apache.pdfbox.cos.COSNumber;
2623
import org.apache.pdfbox.pdmodel.common.PDRectangle;
2724
import org.apache.pdfbox.pdmodel.graphics.color.PDColor;
2825
import org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation;
2926
import org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationPolyline;
3027
import org.apache.pdfbox.pdmodel.PDAppearanceContentStream;
3128
import org.apache.pdfbox.pdmodel.PDDocument;
3229
import static org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationLine.LE_NONE;
33-
import org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotationMarkup;
34-
import org.apache.pdfbox.pdmodel.interactive.annotation.PDBorderStyleDictionary;
3530
import org.apache.pdfbox.util.Matrix;
3631

3732
/**
@@ -213,45 +208,4 @@ public void generateDownAppearance()
213208
{
214209
// No down appearance generated for a polyline annotation
215210
}
216-
217-
//TODO DRY, this code is from polygonAppearanceHandler so it's double
218-
219-
/**
220-
* Get the line with of the border.
221-
*
222-
* Get the width of the line used to draw a border around the annotation.
223-
* This may either be specified by the annotation dictionaries Border
224-
* setting or by the W entry in the BS border style dictionary. If both are
225-
* missing the default width is 1.
226-
*
227-
* @return the line width
228-
*/
229-
// TODO: according to the PDF spec the use of the BS entry is annotation
230-
// specific
231-
// so we will leave that to be implemented by individual handlers.
232-
// If at the end all annotations support the BS entry this can be handled
233-
// here and removed from the individual handlers.
234-
float getLineWidth()
235-
{
236-
PDAnnotationMarkup annotation = (PDAnnotationMarkup) getAnnotation();
237-
238-
PDBorderStyleDictionary bs = annotation.getBorderStyle();
239-
240-
if (bs != null)
241-
{
242-
return bs.getWidth();
243-
}
244-
245-
COSArray borderCharacteristics = annotation.getBorder();
246-
if (borderCharacteristics.size() >= 3)
247-
{
248-
COSBase base = borderCharacteristics.getObject(2);
249-
if (base instanceof COSNumber)
250-
{
251-
return ((COSNumber) base).floatValue();
252-
}
253-
}
254-
255-
return 1;
256-
}
257211
}

0 commit comments

Comments
 (0)