您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
24 行
616 B
24 行
616 B
using UIWidgets.ui;
|
|
|
|
namespace UIWidgets.flow {
|
|
public class OpacityLayer : ContainerLayer {
|
|
private int _alpha;
|
|
|
|
public int alpha {
|
|
set { this._alpha = value; }
|
|
}
|
|
|
|
public override void paint(PaintContext context) {
|
|
var canvas = context.canvas;
|
|
|
|
var paint = new Paint {color = Color.fromARGB(this._alpha, 255, 255, 255)};
|
|
canvas.saveLayer(this.paintBounds, paint);
|
|
try {
|
|
this.paintChildren(context);
|
|
}
|
|
finally {
|
|
canvas.restore();
|
|
}
|
|
}
|
|
}
|
|
}
|