Java Code Examples for android.graphics.Paint#Join
The following examples show how to use
android.graphics.Paint#Join .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RichPolyline.java From richmaps with Apache License 2.0 | 5 votes |
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); }
Example 2
Source File: AndroidGraphics.java From CodenameOne with GNU General Public License v2.0 | 5 votes |
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; } }
Example 3
Source File: ClipDrawable.java From ProjectX with Apache License 2.0 | 5 votes |
/** * 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(); }
Example 4
Source File: PathDrawable.java From ProjectX with Apache License 2.0 | 5 votes |
/** * 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(); }
Example 5
Source File: LineMorphingDrawable.java From material with Apache License 2.0 | 5 votes |
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); }
Example 6
Source File: PDExtendedGraphicsState.java From PdfBox-Android with Apache License 2.0 | 5 votes |
/** * 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; } }
Example 7
Source File: VectorDrawable.java From Mover with Apache License 2.0 | 5 votes |
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; } }
Example 8
Source File: VectorDrawable.java From ElasticProgressBar with Apache License 2.0 | 5 votes |
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; } }
Example 9
Source File: VectorDrawableCompat.java From VectorChildFinder with Apache License 2.0 | 5 votes |
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; } }
Example 10
Source File: RichShape.java From richmaps with Apache License 2.0 | 5 votes |
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); } } }
Example 11
Source File: AndroidGraphics.java From CodenameOne with GNU General Public License v2.0 | 5 votes |
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; } }
Example 12
Source File: ShapeStroke.java From lottie-android with Apache License 2.0 | 5 votes |
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; }
Example 13
Source File: VectorDrawable.java From CanDialog with Apache License 2.0 | 5 votes |
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; } }
Example 14
Source File: LineMorphingDrawable.java From MDPreference with Apache License 2.0 | 5 votes |
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); }
Example 15
Source File: OBStroke.java From GLEXP-Team-onebillion with Apache License 2.0 | 5 votes |
public Paint.Join paintLineJoin() { if (lineJoin == kCALineJoinMiter) return Paint.Join.MITER; if (lineJoin == kCALineJoinRound) return Paint.Join.ROUND; return Paint.Join.BEVEL; }
Example 16
Source File: BaseStrokeContent.java From lottie-android with Apache License 2.0 | 4 votes |
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); } }
Example 17
Source File: LineMorphingDrawable.java From MDPreference with Apache License 2.0 | 4 votes |
public Builder strokeJoin(Paint.Join join){ mStrokeJoin = join; return this; }
Example 18
Source File: PathDrawable.java From ProjectX with Apache License 2.0 | 2 votes |
/** * Return the paint's stroke join type. * * @return the paint's Join. */ public Paint.Join getStrokeJoin() { return mPaint.getStrokeJoin(); }
Example 19
Source File: ClipDrawable.java From ProjectX with Apache License 2.0 | 2 votes |
/** * Return the paint's stroke join type. * * @return the paint's Join. */ public Paint.Join getStrokeJoin() { return mPaint.getStrokeJoin(); }
Example 20
Source File: PDGraphicsState.java From PdfBox-Android with Apache License 2.0 | 2 votes |
/** * Get the value of the line join. * * @return The current line join value. */ public Paint.Join getLineJoin() { return lineJoin; }