android.graphics.Paint#Join ( )源码实例Demo

下面列出了android.graphics.Paint#Join ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: VectorChildFinder   文件: VectorDrawableCompat.java
private Paint.Join getStrokeLineJoin(int id, Paint.Join defValue) {
    switch (id) {
        case LINEJOIN_MITER:
            return Paint.Join.MITER;
        case LINEJOIN_ROUND:
            return Paint.Join.ROUND;
        case LINEJOIN_BEVEL:
            return Paint.Join.BEVEL;
        default:
            return defValue;
    }
}
 
源代码2 项目: GLEXP-Team-onebillion   文件: OBStroke.java
public Paint.Join paintLineJoin()
{
    if (lineJoin == kCALineJoinMiter)
        return Paint.Join.MITER;
    if (lineJoin == kCALineJoinRound)
        return Paint.Join.ROUND;
    return Paint.Join.BEVEL;
}
 
源代码3 项目: MDPreference   文件: LineMorphingDrawable.java
private LineMorphingDrawable(State[] states, int curState, int paddingLeft, int paddingTop, int paddingRight, int paddingBottom, int animDuration, Interpolator interpolator, int strokeSize, int strokeColor, Paint.Cap strokeCap, Paint.Join strokeJoin, boolean clockwise, boolean isRtl){
	mStates = states;
	mPaddingLeft = paddingLeft;
	mPaddingTop = paddingTop;
	mPaddingRight = paddingRight;
	mPaddingBottom = paddingBottom;
	
	mAnimDuration = animDuration;
	mInterpolator = interpolator;
	mStrokeSize = strokeSize;
	mStrokeColor = strokeColor;
	mStrokeCap = strokeCap;
	mStrokeJoin = strokeJoin;
	mClockwise = clockwise;
       mIsRtl = isRtl;
	
	mPaint = new Paint();
	mPaint.setAntiAlias(true);
	mPaint.setStyle(Paint.Style.STROKE);
	mPaint.setStrokeCap(mStrokeCap);
	mPaint.setStrokeJoin(mStrokeJoin);
	mPaint.setColor(mStrokeColor);
	mPaint.setStrokeWidth(mStrokeSize);
	
	mDrawBound = new RectF();
	
	mPath = new Path();			
		
	switchLineState(curState, false);
}
 
源代码4 项目: CanDialog   文件: VectorDrawable.java
private Paint.Join getStrokeLineJoin(int id, Paint.Join defValue) {
    switch (id) {
        case LINEJOIN_MITER:
            return Paint.Join.MITER;
        case LINEJOIN_ROUND:
            return Paint.Join.ROUND;
        case LINEJOIN_BEVEL:
            return Paint.Join.BEVEL;
        default:
            return defValue;
    }
}
 
源代码5 项目: lottie-android   文件: ShapeStroke.java
public Paint.Join toPaintJoin() {
  switch (this) {
    case BEVEL:
      return Paint.Join.BEVEL;
    case MITER:
      return Paint.Join.MITER;
    case ROUND:
      return Paint.Join.ROUND;
  }
  return null;
}
 
源代码6 项目: CodenameOne   文件: AndroidGraphics.java
private Paint.Join convertStrokeJoin(int join){
    switch ( join ){
        case Stroke.JOIN_BEVEL:
            return Paint.Join.BEVEL;
        case Stroke.JOIN_MITER:
            return Paint.Join.MITER;
        case Stroke.JOIN_ROUND:
            return Paint.Join.ROUND;
        default:
            return Paint.Join.BEVEL;
    }
}
 
源代码7 项目: richmaps   文件: RichShape.java
RichShape(final int zIndex,
          final List<RichPoint> points,
          final int strokeWidth,
          final Paint.Cap strokeCap,
          final Paint.Join strokeJoin,
          final PathEffect pathEffect,
          final MaskFilter maskFilter,
          final Shader strokeShader,
          final boolean linearGradient,
          final Integer strokeColor,
          final boolean antialias,
          final boolean closed) {
    this.zIndex = zIndex;
    this.strokeWidth = strokeWidth;
    this.strokeCap = strokeCap;
    this.strokeJoin = strokeJoin;
    this.pathEffect = pathEffect;
    this.maskFilter = maskFilter;
    this.strokeShader = strokeShader;
    this.linearGradient = linearGradient;
    this.strokeColor = strokeColor;
    this.antialias = antialias;
    this.closed = closed;
    if (points != null) {
        for (RichPoint point : points) {
            add(point);
        }
    }
}
 
源代码8 项目: richmaps   文件: RichPolyline.java
RichPolyline(final int zIndex,
             final List<RichPoint> points,
             final int strokeWidth,
             final Paint.Cap strokeCap,
             final Paint.Join strokeJoin,
             final PathEffect pathEffect,
             final MaskFilter maskFilter,
             final Shader strokeShader,
             final boolean linearGradient,
             final Integer strokeColor,
             final boolean antialias,
             final boolean closed) {
    super(zIndex, points, strokeWidth, strokeCap, strokeJoin, pathEffect, maskFilter,
            strokeShader, linearGradient, strokeColor, antialias, closed);
}
 
源代码9 项目: ElasticProgressBar   文件: VectorDrawable.java
private Paint.Join getStrokeLineJoin(int id, Paint.Join defValue) {
    switch (id) {
        case LINEJOIN_MITER:
            return Paint.Join.MITER;
        case LINEJOIN_ROUND:
            return Paint.Join.ROUND;
        case LINEJOIN_BEVEL:
            return Paint.Join.BEVEL;
        default:
            return defValue;
    }
}
 
源代码10 项目: Mover   文件: VectorDrawable.java
private Paint.Join getStrokeLineJoin(int id, Paint.Join defValue) {
  switch (id) {
    case LINEJOIN_MITER:
      return Paint.Join.MITER;
    case LINEJOIN_ROUND:
      return Paint.Join.ROUND;
    case LINEJOIN_BEVEL:
      return Paint.Join.BEVEL;
    default:
      return defValue;
  }
}
 
源代码11 项目: PdfBox-Android   文件: PDExtendedGraphicsState.java
/**
 * This will get the line join style.
 *
 * @return null or the LJ value in the dictionary.
 */
public Paint.Join getLineJoinStyle()
{
    switch(dict.getInt( COSName.LJ ))  {
        case 0:
            return Paint.Join.MITER;
        case 1:
            return Paint.Join.ROUND;
        case 2:
            return Paint.Join.BEVEL;
        default:
            return null;
    }
}
 
源代码12 项目: material   文件: LineMorphingDrawable.java
private LineMorphingDrawable(State[] states, int curState, int width, int height, int paddingLeft, int paddingTop, int paddingRight, int paddingBottom, int animDuration, Interpolator interpolator, int strokeSize, int strokeColor, Paint.Cap strokeCap, Paint.Join strokeJoin, boolean clockwise, boolean isRtl){
	mStates = states;
	mWidth = width;
	mHeight = height;

	mPaddingLeft = paddingLeft;
	mPaddingTop = paddingTop;
	mPaddingRight = paddingRight;
	mPaddingBottom = paddingBottom;
	
	mAnimDuration = animDuration;
	mInterpolator = interpolator;
	mStrokeSize = strokeSize;
	mStrokeColor = strokeColor;
	mStrokeCap = strokeCap;
	mStrokeJoin = strokeJoin;
	mClockwise = clockwise;
       mIsRtl = isRtl;
	
	mPaint = new Paint();
	mPaint.setAntiAlias(true);
	mPaint.setStyle(Paint.Style.STROKE);
	mPaint.setStrokeCap(mStrokeCap);
	mPaint.setStrokeJoin(mStrokeJoin);
	mPaint.setColor(mStrokeColor);
	mPaint.setStrokeWidth(mStrokeSize);
	
	mDrawBound = new RectF();
	
	mPath = new Path();			
		
	switchLineState(curState, false);
}
 
源代码13 项目: ProjectX   文件: PathDrawable.java
/**
 * Set the paint's Join.
 *
 * @param join set the paint's Join, used whenever the paint's style is
 *             Stroke or StrokeAndFill.
 */
public void setStrokeJoin(Paint.Join join) {
    if (mPaint.getStrokeJoin() == join)
        return;
    mPaint.setStrokeJoin(join);
    invalidateSelf();
}
 
源代码14 项目: ProjectX   文件: ClipDrawable.java
/**
 * Set the paint's Join.
 *
 * @param join set the paint's Join, used whenever the paint's style is
 *             Stroke or StrokeAndFill.
 */
public void setStrokeJoin(Paint.Join join) {
    if (mPaint.getStrokeJoin() == join)
        return;
    mPaint.setStrokeJoin(join);
    if (mProvider != null)
        invalidateSelf();
}
 
源代码15 项目: CodenameOne   文件: AndroidGraphics.java
private int convertStrokeJoin(Paint.Join join){
    if ( Paint.Join.BEVEL.equals(join)){
        return Stroke.JOIN_BEVEL;
    } else if ( Paint.Join.MITER.equals(join)){
        return Stroke.JOIN_MITER;
    } else if ( Paint.Join.ROUND.equals(join)){
        return Stroke.JOIN_ROUND;
    } else {
        return Stroke.JOIN_BEVEL;
    }
}
 
源代码16 项目: MDPreference   文件: LineMorphingDrawable.java
public Builder strokeJoin(Paint.Join join){
	mStrokeJoin = join;
	return this;
}
 
源代码17 项目: lottie-android   文件: BaseStrokeContent.java
BaseStrokeContent(final LottieDrawable lottieDrawable, BaseLayer layer, Paint.Cap cap,
    Paint.Join join, float miterLimit, AnimatableIntegerValue opacity, AnimatableFloatValue width,
    List<AnimatableFloatValue> dashPattern, AnimatableFloatValue offset) {
  this.lottieDrawable = lottieDrawable;
  this.layer = layer;

  paint.setStyle(Paint.Style.STROKE);
  paint.setStrokeCap(cap);
  paint.setStrokeJoin(join);
  paint.setStrokeMiter(miterLimit);

  opacityAnimation = opacity.createAnimation();
  widthAnimation = width.createAnimation();

  if (offset == null) {
    dashPatternOffsetAnimation = null;
  } else {
    dashPatternOffsetAnimation = offset.createAnimation();
  }
  dashPatternAnimations = new ArrayList<>(dashPattern.size());
  dashPatternValues = new float[dashPattern.size()];

  for (int i = 0; i < dashPattern.size(); i++) {
    dashPatternAnimations.add(dashPattern.get(i).createAnimation());
  }

  layer.addAnimation(opacityAnimation);
  layer.addAnimation(widthAnimation);
  for (int i = 0; i < dashPatternAnimations.size(); i++) {
    layer.addAnimation(dashPatternAnimations.get(i));
  }
  if (dashPatternOffsetAnimation != null) {
    layer.addAnimation(dashPatternOffsetAnimation);
  }

  opacityAnimation.addUpdateListener(this);
  widthAnimation.addUpdateListener(this);

  for (int i = 0; i < dashPattern.size(); i++) {
    dashPatternAnimations.get(i).addUpdateListener(this);
  }
  if (dashPatternOffsetAnimation != null) {
    dashPatternOffsetAnimation.addUpdateListener(this);
  }
}
 
源代码18 项目: PdfBox-Android   文件: PDGraphicsState.java
/**
 * Get the value of the line join.
 *
 * @return The current line join value.
 */
public Paint.Join getLineJoin()
{
    return lineJoin;
}
 
源代码19 项目: ProjectX   文件: PathDrawable.java
/**
 * Return the paint's stroke join type.
 *
 * @return the paint's Join.
 */
public Paint.Join getStrokeJoin() {
    return mPaint.getStrokeJoin();
}
 
源代码20 项目: ProjectX   文件: ClipDrawable.java
/**
 * Return the paint's stroke join type.
 *
 * @return the paint's Join.
 */
public Paint.Join getStrokeJoin() {
    return mPaint.getStrokeJoin();
}