@Override
protected void onDraw(final Canvas canvas) {
super.onDraw(canvas);
if (this.paint == null) {
this.paint = new Paint();
this.luar = new LinearGradient(0.f, 0.f, 0.f, this.ukuranUiPx, 0xffffffff, 0xff000000,
TileMode.CLAMP);
}
this.tmp00[1] = this.tmp00[2] = 1.f;
this.tmp00[0] = this.hue;
int rgb = Color.HSVToColor(this.tmp00);
this.dalam = new LinearGradient(0.f, 0.f, this.ukuranUiPx, 0.f, 0xffffffff, rgb,
TileMode.CLAMP);
ComposeShader shader = new ComposeShader(this.luar, this.dalam, PorterDuff.Mode.MULTIPLY);
this.paint.setShader(shader);
canvas.drawRect(0.f, 0.f, this.ukuranUiPx, this.ukuranUiPx, this.paint);
}
AmbilWarnaKotak.java 文件源码
java
阅读 28
收藏 0
点赞 0
评论 0
项目:Upkeep
作者:
评论列表
文章目录