StaggerTextWaterMarkPainter class

交错文本水印画笔,可以在水平或垂直方向上组合两个文本水印, 通过给第二个文本水印指定不同的 padding 来实现交错效果。

Inheritance

Constructors

StaggerTextWaterMarkPainter({required String text, String? text2, EdgeInsets? padding1, EdgeInsets padding2 = const EdgeInsets.all(30), double? rotate, TextStyle? textStyle, Axis staggerAxis = Axis.vertical, TextDirection textDirection = TextDirection.ltr})

Properties

hashCode int
The hash code for this object.
no setterinherited
padding1 EdgeInsets?
getter/setter pair
padding2 EdgeInsets
getter/setter pair
rotate double?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
staggerAxis Axis
getter/setter pair
text String
getter/setter pair
text2 String
getter/setter pair
textDirection TextDirection
getter/setter pair
textStyle TextStyle?
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paintUnit(Canvas canvas, double devicePixelRatio) Size
绘制"单元水印",完整的水印是由单元水印重复平铺组成,返回值为"单元水印"占用空间的大小。 devicePixelRatio: 因为最终要将绘制内容保存为图片,所以在绘制时需要根据屏幕的 DPR来放大,以防止失真
override
shouldRepaint(covariant StaggerTextWaterMarkPainter oldPainter) bool
是否需要重绘
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited