Class RectangleAnnotation
- java.lang.Object
-
- com.pdftools.toolbox.internal.NativeBase
-
- com.pdftools.toolbox.internal.NativeObject
-
- com.pdftools.toolbox.pdf.annotations.Annotation
-
- com.pdftools.toolbox.pdf.annotations.MarkupAnnotation
-
- com.pdftools.toolbox.pdf.annotations.DrawingAnnotation
-
- com.pdftools.toolbox.pdf.annotations.RectangleAnnotation
-
public class RectangleAnnotation extends DrawingAnnotation
A rectangle drawing annotation
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RectangleAnnotation
create(Document targetDocument, Rectangle boundingBox, Stroke stroke, Paint fill)
Create a rectangle annotation.Paint
getFill()
The filling paint (Getter)-
Methods inherited from class com.pdftools.toolbox.pdf.annotations.DrawingAnnotation
getPaint, getPopup
-
Methods inherited from class com.pdftools.toolbox.pdf.annotations.MarkupAnnotation
getInfo, getLocked, getReplies
-
Methods inherited from class com.pdftools.toolbox.pdf.annotations.Annotation
copy, getBoundingBox, getHidden, getId, getNoPrint, getNoRotate, getNoZoom
-
Methods inherited from class com.pdftools.toolbox.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
create
public static RectangleAnnotation create(Document targetDocument, Rectangle boundingBox, Stroke stroke, Paint fill)
Create a rectangle annotation.
The returned rectangle annotation is not yet part of any page. It can be added to a page's list of annotations.- Parameters:
targetDocument
- The output document with which the returned object is associated.boundingBox
- The location on the page.stroke
- The stroking parameters used for stroking the rectangle. The stroking paint is used as the annotation's main paint. Ifnull
then the rectangle is not stroked.fill
- The paint used for filling the rectangle. Ifnull
then the rectangle is not filled.- Returns:
- The newly created rectangle annotation.
- Throws:
java.lang.IllegalArgumentException
- if thetargetDocument
isnull
java.lang.IllegalArgumentException
- if thetargetDocument
is read-onlyjava.lang.IllegalArgumentException
- if thestroke
andfill
arguments are bothnull
java.lang.IllegalArgumentException
- if thestroke
argument is not associated with thetargetDocument
java.lang.IllegalArgumentException
- if thestroke
'stoolbox.pdf.content.Stroke.getPaint
has atoolbox.pdf.content.Paint.getColorSpace
other than a device color spacejava.lang.IllegalArgumentException
- if thestroke
'stoolbox.pdf.content.Stroke.getPaint
has a non-null
toolbox.pdf.content.Paint.getTransparency
withtoolbox.pdf.content.Transparency.getBlendMode
other thantoolbox.pdf.content.BlendMode.NORMAL
java.lang.IllegalArgumentException
- if thestroke
argument'stoolbox.pdf.content.Stroke.getLineCapStyle
is other thantoolbox.pdf.content.LineCapStyle.BUTT
java.lang.IllegalArgumentException
- if thestroke
argument'stoolbox.pdf.content.Stroke.getLineJoinStyle
is other thantoolbox.pdf.content.LineJoinStyle.MITER
java.lang.IllegalArgumentException
- if thestroke
argument'stoolbox.pdf.content.Stroke.getMiterLimit
is other than 10java.lang.IllegalArgumentException
- if thestroke
argument'stoolbox.pdf.content.Stroke.getDashPhase
is other than 0java.lang.IllegalArgumentException
- if thefill
has atoolbox.pdf.content.Paint.getColorSpace
other than a device color spacejava.lang.IllegalArgumentException
- if thefill
has a non-null
toolbox.pdf.content.Paint.getTransparency
withtoolbox.pdf.content.Transparency.getBlendMode
other thantoolbox.pdf.content.BlendMode.NORMAL
java.lang.IllegalArgumentException
- if thefill
argument is not associated with thetargetDocument
java.lang.IllegalArgumentException
- iftargetDocument
isnull
java.lang.IllegalArgumentException
- ifboundingBox
isnull
-
getFill
public Paint getFill()
The filling paint (Getter)
- Throws:
java.lang.IllegalStateException
- if the object has already been closed
-
-