Class Watermark
java.lang.Object
org.ofdrw.layout.edit.Annotation
org.ofdrw.layout.edit.Watermark
-
Constructor Summary
ConstructorsConstructorDescriptionWatermark(double x, double y, double width, double height) 根据水印绘制区域坐标和大小构建水印对象Watermark(PageLayout style) 根据页面布局样式构建水印对象 -
Method Summary
Modifier and TypeMethodDescriptiondebug()开启调试getAngle()旋转角度getBold()获取文字是否粗体标识getColor()获取水印文字颜色获取绘制器获取字体名称double获取字体大小字体宽度,遵循 CSS3标准,可选值为 normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900水印透明度,可取值 0.0~1.0,默认 0.5获取水印横向间距,单位mm获取水印纵向间距,单位mm获取文字是否斜体标识获取文字字间距getValue()获取水印文字内容设置旋转角度,表示基于坐标系(0,1)方向,向顺时针方向偏移的角度。 与数学意义上的圆弧角度存在360度偏差,即 360-angle=数学弧度。是否粗体设置水印文字颜色setDrawer(WatermarkDrawer drawer) 设置水印绘制器设置单元格绘制器使用的外部字体setFontName(String fontName) 设置字体名称setFontSize(double fontSize) 设置字体大小setFontWeight(String fontWeight) 字体宽度setGlobalAlpha(Double globalAlpha) 设置水印透明度,可取值 0.0~1.0,默认 0.5setIntervalX(Double intervalX) 水印横向间距setIntervalY(Double intervalY) 水印纵向间距是否斜体setLetterSpacing(Double letterSpacing) 设置文字字间距设置文字水印内容Methods inherited from class Annotation
addParameter, build, getBoundary, getCreator, getLastModDate, getNoRotate, getNoZoom, getParameters, getPrint, getReadOnly, getRemark, getSubtype, getType, getVisible, setBoundary, setCreator, setDrawer, setLastModDate, setNoRotate, setNoZoom, setPrint, setReadOnly, setRemark, setSubtype, setType, setVisibleModifier and TypeMethodDescriptionaddParameter(String name, String parameter) 增加 注释参数org.ofdrw.core.annotation.pageannot.Annotbuild()获取注释底层对象org.ofdrw.core.basicType.ST_Box获取 注释创建者获取 最近一次修改的时间获取 对象的 Remark 信息是否不随页面旋转而旋转获取 对象的 Remark 信息是否不随页面缩放而同步缩放获取 一组注释参数getPrint()设置 对象的Remark 信息是否随页面一起打印获取 对象的 Remark 信息是否不能被用户更改获取 注释说明内容获取 注释子类型org.ofdrw.core.annotation.pageannot.AnnotTypegetType()获取 注释类型获取 表示该注释对象是否显示voidsetBoundary(org.ofdrw.core.basicType.ST_Box boundary) setCreator(String creator) 设置 注释创建者设置注释绘制器setLastModDate(LocalDate lastModDate) 设置 最近一次修改的时间setNoRotate(boolean noRotate) 设置 对象的 Remark 信息是否不随页面旋转而旋转setNoZoom(boolean noZoom) 设置 对象的 Remark 信息是否不随页面缩放而同步缩放setPrint(boolean print) 设置 对象的Remark 信息是否随页面一起打印setReadOnly(boolean readOnly) 设置 对象的 Remark 信息是否不能被用户更改设置 注释说明内容setSubtype(String subtype) 设置 注释子类型setType(org.ofdrw.core.annotation.pageannot.AnnotType type) 设置 注释类型setVisible(boolean visible) 设置 表示该注释对象是否显示
-
Constructor Details
-
Watermark
-
Watermark
public Watermark(double x, double y, double width, double height) 根据水印绘制区域坐标和大小构建水印对象- Parameters:
x- 绘制区域左上角横坐标, 单位mmy- 绘制区域左上角纵坐标, 单位mmwidth- 绘制区域宽度, 单位mmheight- 绘制区域高度, 单位mm
-
-
Method Details
-
getDrawer
-
setDrawer
-
setValue
-
getColor
获取水印文字颜色- Returns:
- 颜色 CSS3样式的颜色值,可选值 颜色英文单词,例如red,blue、16进制颜色值,#000000、rgb(0,0,0)、rgba(0,0,0,1)
-
setColor
-
getFontName
-
setFontName
-
getFontSize
public double getFontSize()获取字体大小- Returns:
- 字体大小, 单位 mm
-
setFontSize
设置字体大小- Parameters:
fontSize- 字体大小,单位 mm- Returns:
- this
-
getBold
-
setBold
-
getFontWeight
字体宽度,遵循 CSS3标准,可选值为 normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900- Returns:
- 字体宽度,可选值为 normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
-
setFontWeight
-
getItalic
-
setItalic
-
getLetterSpacing
-
setLetterSpacing
-
getGlobalAlpha
-
setGlobalAlpha
-
getAngle
-
setAngle
-
getValue
-
getIntervalX
-
setIntervalX
-
getIntervalY
-
setIntervalY
-
setFont
-
debug
-