TextWaterMarkPainter class
文本水印画笔
- Inheritance
-
- Object
- WaterMarkPainter
- TextWaterMarkPainter
Constructors
- TextWaterMarkPainter({Key? key, double? rotate, EdgeInsets? padding, TextStyle? textStyle, required String text, TextDirection textDirection = TextDirection.ltr})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- padding ↔ EdgeInsets
-
getter/setter pair
- rotate ↔ double
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- text ↔ 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 TextWaterMarkPainter oldPainter) → bool -
是否需要重绘
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited