public interface SpincastImageWatermarkerBuilder
SpincastImageWatermarkerBuilder text(String text)
#image(File).
By default, this text is the root URL of the application (for example: "https://www.example.com").
SpincastImageWatermarkerBuilder text(String text, Font font)
SpincastImageWatermarkerBuilder text(String text, Color color)
SpincastImageWatermarkerBuilder text(String text, Color color, Font font)
SpincastImageWatermarkerBuilder text(Color color)
SpincastImageWatermarkerBuilder text(Color color, Font font)
SpincastImageWatermarkerBuilder text(Font font)
SpincastImageWatermarkerBuilder backgroundColor(Color color)
text watermark.
Default to white.
You can set this to null to get a
transparent background!
SpincastImageWatermarkerBuilder image(String imageFilePath)
Calling this will remove any text set using {@link #text(String).
Empty by default.
an - exception if the specified file doesn't exist
or is not a valid image.SpincastImageWatermarkerBuilder image(String imageFilePath, boolean onClasspath)
Calling this will remove any text set using {@link #text(String).
Empty by default.
onClasspath - if true, the imageFilePath
will be considered as a classpath path. Otherwise, the image will
be taken from the file system.an - exception if the specified file doesn't exist
or is not a valid image.SpincastImageWatermarkerBuilder position(SpincastWatermarkPosition position)
Defaults to .
SpincastImageWatermarkerBuilder position(SpincastWatermarkPosition position, int margin)
Defaults to .
The - margin (in pixels) between the watermark and the edge of the
image.SpincastImageWatermarkerBuilder opacity(float opacity)
Between 0.0 and 1.0.
Defaults to 1.0, no transparency.
SpincastImageWatermarkerBuilder widthPercent(int percentageWidth)
Defaults to 50.
SpincastImageWatermarkerBuilder border(int widthInPixels, Color color)
Set the widthInPixels to 0 to prevent any border
to be added.
Default to a 5 pixels black border.
color - Can be null: will be black then.SpincastImageWatermarker build()
SpincastImageWatermarker.Copyright © 2019. All rights reserved.