PaintContent class abstract

绘制内容抽象基类

所有绘制内容(线条、形状等)的基类 定义了绘制的生命周期方法和序列化接口

Paint Content Abstract Base Class

Base class for all drawing content (lines, shapes, etc.) Defines the lifecycle methods and serialization interface for drawing

Implementers

Constructors

PaintContent()
PaintContent.paint(Paint paint)

Properties

contentType String
内容类型标识(用于JSON序列化)
no setter
hashCode int
The hash code for this object.
no setterinherited
paint Paint
画笔配置
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copy() PaintContent
复制实例,避免对象引用传递
draw(Canvas canvas, Size size, bool deeper) → void
绘制核心方法 canvas 画布对象 size 画布尺寸 deeper 当前是否为底层绘制(true为历史记录层,false为实时绘制层)
drawing(Offset nowPoint) → void
绘制过程中调用(手指移动时)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startDraw(Offset startPoint) → void
开始绘制(手指按下时)
toContentJson() Map<String, dynamic>
转换为JSON内容(子类实现)
toJson() Map<String, dynamic>
转换为JSON对象
toString() String
A string representation of this object.
override

Operators

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