Class TextWatermark.Builder
java.lang.Object
cloud.opencode.base.image.watermark.TextWatermark.Builder
- Enclosing class:
TextWatermark
Text Watermark Builder
文字水印构建器
- Since:
- JDK 25, opencode-base-image V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the watermark 构建水印color(int r, int g, int b) Set color by RGB 按RGB设置颜色color(int r, int g, int b, int a) Set color by RGBA 按RGBA设置颜色Set color 设置颜色Set font 设置字体Set font by name and size 按名称和大小设置字体Set font by name, style and size 按名称、样式和大小设置字体margin(int margin) Set margin 设置边距opacity(float opacity) Set opacity 设置透明度Set position 设置位置Set text 设置文字
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
text
Set text 设置文字- Parameters:
text- the text | 文字- Returns:
- this builder | 构建器
-
position
Set position 设置位置- Parameters:
position- the position | 位置- Returns:
- this builder | 构建器
-
font
Set font 设置字体- Parameters:
font- the font | 字体- Returns:
- this builder | 构建器
-
font
Set font by name and size 按名称和大小设置字体- Parameters:
name- the font name | 字体名称size- the font size | 字体大小- Returns:
- this builder | 构建器
-
font
Set font by name, style and size 按名称、样式和大小设置字体- Parameters:
name- the font name | 字体名称style- the font style | 字体样式size- the font size | 字体大小- Returns:
- this builder | 构建器
-
color
Set color 设置颜色- Parameters:
color- the color | 颜色- Returns:
- this builder | 构建器
-
color
Set color by RGB 按RGB设置颜色- Parameters:
r- red component | 红色分量g- green component | 绿色分量b- blue component | 蓝色分量- Returns:
- this builder | 构建器
-
color
Set color by RGBA 按RGBA设置颜色- Parameters:
r- red component | 红色分量g- green component | 绿色分量b- blue component | 蓝色分量a- alpha component | 透明度分量- Returns:
- this builder | 构建器
-
opacity
Set opacity 设置透明度- Parameters:
opacity- the opacity | 透明度- Returns:
- this builder | 构建器
-
margin
Set margin 设置边距- Parameters:
margin- the margin | 边距- Returns:
- this builder | 构建器
-
build
-