当前位置: 首页>>代码示例>>Java>>正文


Java WXViewUtils.multiplyColorAlpha方法代码示例

本文整理汇总了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();
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:20,代码来源:BorderDrawable.java

示例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();
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:27,代码来源:BorderDrawable.java

示例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();
}
 
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:25,代码来源:BorderDrawable.java

示例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);
}
 
开发者ID:amap-demo,项目名称:weex-3d-map,代码行数:10,代码来源:BorderDrawable.java

示例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);
}
 
开发者ID:weexext,项目名称:ucar-weex-core,代码行数:10,代码来源:BorderDrawable.java

示例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);
}
 
开发者ID:erguotou520,项目名称:weex-uikit,代码行数:11,代码来源:BorderDrawable.java


注:本文中的com.taobao.weex.utils.WXViewUtils.multiplyColorAlpha方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。