您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
44 行
1.1 KiB
44 行
1.1 KiB
using UIWidgets.foundation;
|
|
using UIWidgets.ui;
|
|
|
|
namespace UIWidgets.painting {
|
|
public abstract class Decoration : Diagnosticable {
|
|
protected Decoration() {
|
|
}
|
|
|
|
public override string toStringShort() {
|
|
return this.GetType().ToString();
|
|
}
|
|
|
|
public virtual bool debugAssertIsValid() {
|
|
return true;
|
|
}
|
|
|
|
public virtual EdgeInsets padding {
|
|
get { return EdgeInsets.zero; }
|
|
}
|
|
|
|
public virtual bool isComplex {
|
|
get { return false; }
|
|
}
|
|
|
|
public virtual bool hitTest(Size size, Offset position) {
|
|
return true;
|
|
}
|
|
|
|
public abstract BoxPainter createBoxPainter(VoidCallback onChanged = null);
|
|
}
|
|
|
|
public abstract class BoxPainter {
|
|
protected BoxPainter(VoidCallback onChanged = null) {
|
|
this.onChanged = onChanged;
|
|
}
|
|
|
|
public readonly VoidCallback onChanged;
|
|
|
|
public abstract void paint(Canvas canvas, Offset offset, ImageConfiguration configuration);
|
|
|
|
public virtual void dispose() {
|
|
}
|
|
}
|
|
}
|