Package com.day.cq.dam.commons.watermark
Class TextWatermark
java.lang.Object
com.day.cq.dam.commons.watermark.Watermark
com.day.cq.dam.commons.watermark.ImageWatermark
com.day.cq.dam.commons.watermark.TextWatermark
A
While actually applying the watermark effect, the styled text is converted to an image so that the effect is uniform.
TextWatermark represents a string of text to be used to watermark an underlying image.While actually applying the watermark effect, the styled text is converted to an image so that the effect is uniform.
-
Field Summary
FieldsFields inherited from class com.day.cq.dam.commons.watermark.Watermark
DEFAULT_LOCATION, DEFAULT_OPACITY, DEFAULT_ORIENTATION -
Constructor Summary
ConstructorsConstructorDescriptionTextWatermark(int top, int left, double orientation, float opacity, String text, Font font) TextWatermark(int top, int left, String text, Font font) TextWatermark(Location position, double orientation, float opacity, String text, Font font) TextWatermark(Location position, String text, Font font) TextWatermark(String text) TextWatermark(String text, Font font) -
Method Summary
Modifier and TypeMethodDescriptiongetFont()getImage()Generates a transparent image representing the text of this watermark.getText()booleanvoidvoidvoidsetVertical(boolean vertical) toString()Methods inherited from class com.day.cq.dam.commons.watermark.ImageWatermark
setImageMethods inherited from class com.day.cq.dam.commons.watermark.Watermark
getLeft, getOpacity, getOrientation, getPosition, getTop, setCoords, setLeft, setOpacity, setOrientation, setPosition, setTop
-
Field Details
-
COPYRIGHT
- See Also:
-
-
Constructor Details
-
TextWatermark
-
TextWatermark
-
TextWatermark
-
TextWatermark
-
TextWatermark
-
TextWatermark
-
-
Method Details
-
getText
-
setText
-
getFont
-
setFont
-
getImage
Generates a transparent image representing the text of this watermark. Text in the image will abide by the font specifications.- Overrides:
getImagein classImageWatermark- Returns:
- the
BufferedImageobject thus produced
-
toString
-
isVertical
public boolean isVertical() -
setVertical
public void setVertical(boolean vertical)
-