Package org.jpedal.annotation
Class FreeText
java.lang.Object
org.jpedal.annotation.Annotation
org.jpedal.annotation.Markup
org.jpedal.annotation.FreeText
public final class FreeText
extends org.jpedal.annotation.Markup
Defines a FreeText annotation.
A free text annotation displays text directly on the page. Unlike an ordinary Text annotation a FreeText annotation has no open or closed state.
-
Constructor Summary
ConstructorsConstructorDescriptionFreeText
(float[] rect, int flags, String contents, float[] color, float strokingAlpha, float nonStrokingAlpha, String baseFontName, int fontSize, float[] fontColor, Quadding justification) Create a new FreeText annotation.FreeText
(float[] rect, int flags, String contents, float[] color, float strokingAlpha, float nonStrokingAlpha, String title, String baseFontName, int fontSize, float[] fontColor, Quadding justification) Create a new FreeText annotation.FreeText
(float[] rect, String contents, float[] color, String baseFontName, int fontSize, Quadding justification) Create a new FreeText annotation. -
Method Summary
Modifier and TypeMethodDescriptionorg.jpedal.io.annotation.utils.AnnotDict
getDict()
Creates the annotation dictionary.Methods inherited from class org.jpedal.annotation.Annotation
getFlagsValue
-
Constructor Details
-
FreeText
public FreeText(float[] rect, String contents, float[] color, String baseFontName, int fontSize, Quadding justification) Create a new FreeText annotation.- Parameters:
rect
- two diagonally opposite coordinate points that indicate the annotation's bounding boxcontents
- text that shall be displayed or nullcolor
- the color of the annotationbaseFontName
- the name of the base font to use. SeeBaseFont
fontSize
- the font sizejustification
- the quadding (text justification). SeeQuadding
-
FreeText
public FreeText(float[] rect, int flags, String contents, float[] color, float strokingAlpha, float nonStrokingAlpha, String baseFontName, int fontSize, float[] fontColor, Quadding justification) Create a new FreeText annotation.- Parameters:
rect
- two diagonally opposite coordinate points that indicate the annotation's bounding boxflags
- the annotation's flags. SeeAnnotation.getFlagsValue(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean)
contents
- text that shall be displayed or nullcolor
- the color of the annotationstrokingAlpha
- the line transparency valuenonStrokingAlpha
- the fill transparency valuebaseFontName
- the name of the base font to use. SeeBaseFont
fontSize
- the font sizefontColor
- the color of the textjustification
- the quadding (text justification). SeeQuadding
-
FreeText
public FreeText(float[] rect, int flags, String contents, float[] color, float strokingAlpha, float nonStrokingAlpha, String title, String baseFontName, int fontSize, float[] fontColor, Quadding justification) Create a new FreeText annotation.- Parameters:
rect
- two diagonally opposite coordinate points that indicate the annotation's bounding boxflags
- the annotation's flags. SeeAnnotation.getFlagsValue(boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean, boolean)
contents
- text that shall be displayed or nullcolor
- the color of the annotationstrokingAlpha
- the line transparency valuenonStrokingAlpha
- the fill transparency valuetitle
- the text for the title barbaseFontName
- the name of the base font to use. SeeBaseFont
fontSize
- the font sizefontColor
- the color of the textjustification
- the quadding. SeeQuadding
-
-
Method Details
-
getDict
public org.jpedal.io.annotation.utils.AnnotDict getDict()Creates the annotation dictionary.This method is considered as not part of the public API.
- Overrides:
getDict
in classorg.jpedal.annotation.Markup
- Returns:
- a dictionary containing the relevant entries.
-