public void setStrokeMiter(int strokeMiter) { this.strokeMiter = strokeMiter; if(strokeMiter > 0) { borderPaint.setStrokeMiter(strokeMiter); } }
private void updatePaint() { paint.setStrokeCap(strokeLineCap); paint.setStrokeJoin(strokeLineJoin); paint.setStrokeMiter(strokeMiterLimit); paint.setStrokeWidth(strokeWidth); //todo fillType }
paint.setStrokeCap(cap); paint.setStrokeJoin(join); paint.setStrokeMiter(miterLimit);
@Override public void setStrokeMiterLimit(float strokeMiterLimit) { strokePaint.setStrokeMiter(strokeMiterLimit); }
void setMiterLimit(float miter) { paint.setStrokeMiter(miter); }
void setMiterLimit(float miter) { paint.setStrokeMiter(miter); }
void setMiterLimit(float miter) { paint.setStrokeMiter(miter); }
private Paint initTextPaint(int color) { Paint paint = new Paint(); paint.setColor(color); paint.setStyle(Paint.Style.FILL); paint.setStrokeMiter(0); paint.setTextSize(25); paint.setTypeface(typeface); return paint; }
private void initPaint() { mPaint = new Paint(); mPaint.setColor(IPenConfig.PEN_CORLOUR); mPaint.setStrokeWidth(PEN_WIDTH); mPaint.setStyle(Paint.Style.STROKE); mPaint.setStrokeCap(Paint.Cap.ROUND);//结束的笔画为圆心 mPaint.setStrokeJoin(Paint.Join.ROUND);//连接处元 mPaint.setAlpha(0xFF); mPaint.setAntiAlias(true); mPaint.setStrokeMiter(1.0f); mStokeBrushPen.setPaint(mPaint); }
private void initPaint() { paint = new Paint(); paint.setColor(defaultColor); paint.setAntiAlias(true); paint.setDither(true); paint.setStrokeWidth(defaultStrokeWidth); paint.setStrokeMiter(180.0f); paint.setStyle(Paint.Style.STROKE); paint.setStrokeJoin(Paint.Join.ROUND); paint.setStrokeCap(Paint.Cap.ROUND); SmartDrawingView.this.setFocusable(true); SmartDrawingView.this.setFocusableInTouchMode(true); }
private void initPaint(Context context) { mPaint = new Paint(); mPaint.setColor(IPenConfig.PEN_CORLOUR); mPaint.setStrokeWidth(PEN_WIDTH); mPaint.setStyle(Paint.Style.STROKE); mPaint.setStrokeCap(Paint.Cap.ROUND);//结束的笔画为圆心 mPaint.setStrokeJoin(Paint.Join.ROUND);//连接处元 mPaint.setAlpha(0xFF); mPaint.setAntiAlias(true); mPaint.setStrokeMiter(1.0f); mStokeBrushPen.setPaint(mPaint); mVisualStrokePen.setPaint(mPaint); } private void initCanvas() {
@Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M && mBorderWidth > 0) { mPaint.setColor(Color.BLACK); mPaint.setXfermode(null); if (mBorderColor != null) mPaint.setColor(mBorderColor.getColorForState(getDrawableState(), mBorderColor.getDefaultColor())); mPaint.setStyle(Paint.Style.STROKE); mPaint.setStrokeMiter(10); mPaint.setStrokeWidth(mBorderWidth * 2); canvas.drawPath(mOutlinePath, mPaint); } }
@Override public void onDrawForeground(Canvas canvas) { if (mBorderWidth > 0) { mPaint.setColor(Color.BLACK); mPaint.setXfermode(null); if (mBorderColor != null) mPaint.setColor(mBorderColor.getColorForState(getDrawableState(), mBorderColor.getDefaultColor())); mPaint.setStyle(Paint.Style.STROKE); mPaint.setStrokeMiter(10); mPaint.setStrokeWidth(mBorderWidth * 2); canvas.drawPath(mOutlinePath, mPaint); } super.onDrawForeground(canvas); }
/** * Set the paint's stroke miter value. This is used to control the behavior * of miter joins when the joins angle is sharp. This value must be >= 0. * * @param miter set the miter limit on the paint, used whenever the paint's * style is Stroke or StrokeAndFill. */ public void setStrokeMiter(float miter) { if (mPaint.getStrokeMiter() == miter) return; mPaint.setStrokeMiter(miter); invalidateSelf(); }
/** * Set the paint's stroke miter value. This is used to control the behavior * of miter joins when the joins angle is sharp. This value must be >= 0. * * @param miter set the miter limit on the paint, used whenever the paint's * style is Stroke or StrokeAndFill. */ public void setStrokeMiter(float miter) { if (mPaint.getStrokeMiter() == miter) return; mPaint.setStrokeMiter(miter); if (mProvider != null) invalidateSelf(); }
/** * Set the paint's stroke miter value. This is used to control the behavior * of miter joins when the joins angle is sharp. This value must be >= 0. * * @param miter set the miter limit on the paint, used whenever the paint's * style is Stroke or StrokeAndFill. */ public void setStrokeMiter(float miter) { if (mPaint.getStrokeMiter() == miter) return; mPaint.setStrokeMiter(miter); invalidateSelf(); }
@Override protected void updatePaint() { super.updatePaint(); getPaint().setStyle(Paint.Style.STROKE); getPaint().setStrokeCap(Paint.Cap.ROUND); getPaint().setStrokeJoin(Paint.Join.ROUND); getPaint().setStrokeMiter(0); }
@Override protected void updatePaint() { super.updatePaint(); if (!isEdgeRounded()) { getPaint().setStrokeMiter(Integer.MAX_VALUE); getPaint().setStrokeWidth(0); getPaint().setStyle(Paint.Style.FILL_AND_STROKE); } }
@Override protected void updatePaint() { super.updatePaint(); if (!isEdgeRounded()) { getPaint().setStrokeMiter(Integer.MAX_VALUE); getPaint().setStrokeWidth(0); getPaint().setStyle(Paint.Style.FILL_AND_STROKE); } }
@Override protected void updatePaint() { super.updatePaint(); if (!isEdgeRounded()) { getPaint().setStrokeMiter(Integer.MAX_VALUE); getPaint().setStrokeWidth(0); getPaint().setStyle(Paint.Style.FILL_AND_STROKE); } }