本文整理汇总了Java中com.taobao.weex.utils.WXViewUtils.multiplyColorAlpha方法的典型用法代码示例。如果您正苦于以下问题:Java WXViewUtils.multiplyColorAlpha方法的具体用法?Java WXViewUtils.multiplyColorAlpha怎么用?Java WXViewUtils.multiplyColorAlpha使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.taobao.weex.utils.WXViewUtils
的用法示例。
在下文中一共展示了WXViewUtils.multiplyColorAlpha方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: draw
import com.taobao.weex.utils.WXViewUtils; //导入方法依赖的package包/类
@Override
public void draw(Canvas canvas) {
canvas.save();
updateBorderOutline();
if (mPathForBorderOutline != null) {
int useColor = WXViewUtils.multiplyColorAlpha(mColor, mAlpha);
if ((useColor >>> 24) != 0) {
mPaint.setStyle(Paint.Style.FILL);
mPaint.setColor(useColor);
mPaint.setShader(null);
canvas.drawPath(mPathForBorderOutline, mPaint);
}
}
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setStrokeJoin(Paint.Join.ROUND);
drawBorders(canvas);
mPaint.setShader(null);
canvas.restore();
}
示例2: draw
import com.taobao.weex.utils.WXViewUtils; //导入方法依赖的package包/类
@Override
public void draw(@NonNull Canvas canvas) {
canvas.save();
updateBorderOutline();
//Shader uses alpha as well.
mPaint.setAlpha(255);
if (mPathForBorderOutline != null) {
int useColor = WXViewUtils.multiplyColorAlpha(mColor, mAlpha);
if (mShader != null) {
mPaint.setShader(mShader);
mPaint.setStyle(Paint.Style.FILL);
canvas.drawPath(mPathForBorderOutline, mPaint);
mPaint.setShader(null);
} else if ((useColor >>> 24) != 0) {
mPaint.setColor(useColor);
mPaint.setStyle(Paint.Style.FILL);
canvas.drawPath(mPathForBorderOutline, mPaint);
mPaint.setShader(null);
}
}
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setStrokeJoin(Paint.Join.ROUND);
drawBorders(canvas);
mPaint.setShader(null);
canvas.restore();
}
示例3: draw
import com.taobao.weex.utils.WXViewUtils; //导入方法依赖的package包/类
@Override
public void draw(@NonNull Canvas canvas) {
canvas.save();
updateBorderOutline();
if (mPathForBorderOutline != null) {
int useColor = WXViewUtils.multiplyColorAlpha(mColor, mAlpha);
if (mShader != null) {
mPaint.setShader(mShader);
mPaint.setStyle(Paint.Style.FILL);
canvas.drawPath(mPathForBorderOutline, mPaint);
mPaint.setShader(null);
} else if ((useColor >>> 24) != 0) {
mPaint.setColor(useColor);
mPaint.setStyle(Paint.Style.FILL);
canvas.drawPath(mPathForBorderOutline, mPaint);
mPaint.setShader(null);
}
}
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setStrokeJoin(Paint.Join.ROUND);
drawBorders(canvas);
mPaint.setShader(null);
canvas.restore();
}
示例4: preparePaint
import com.taobao.weex.utils.WXViewUtils; //导入方法依赖的package包/类
private void preparePaint(int side) {
float borderWidth = getBorderWidth(side);
int color = WXViewUtils.multiplyColorAlpha(getBorderColor(side), mAlpha);
BorderStyle borderStyle = BorderStyle.values()[getBorderStyle(side)];
Shader shader = borderStyle.getLineShader(borderWidth, color, side);
mPaint.setShader(shader);
mPaint.setColor(color);
mPaint.setStrokeWidth(borderWidth);
}
示例5: preparePaint
import com.taobao.weex.utils.WXViewUtils; //导入方法依赖的package包/类
private void preparePaint(@BorderWidthStyleColorType int side) {
float borderWidth = getBorderWidth(side);
int color = WXViewUtils.multiplyColorAlpha(getBorderColor(side), mAlpha);
BorderStyle borderStyle = BorderStyle.values()[getBorderStyle(side)];
Shader shader = borderStyle.getLineShader(borderWidth, color, side);
mPaint.setShader(shader);
mPaint.setColor(color);
mPaint.setStrokeCap(Paint.Cap.ROUND);
}
示例6: preparePaint
import com.taobao.weex.utils.WXViewUtils; //导入方法依赖的package包/类
private void preparePaint(int side) {
float borderWidth = getBorderWidth(side);
int color = WXViewUtils.multiplyColorAlpha(getBorderColor(side), mAlpha);
BorderStyle borderStyle = BorderStyle.values()[getBorderStyle(side)];
Shader shader = borderStyle.getLineShader(borderWidth, color, side);
mPaint.setShader(shader);
mPaint.setColor(color);
mPaint.setStrokeWidth(borderWidth);
mPaint.setStrokeCap(Paint.Cap.ROUND);
}