void showPath (Canvas canvas, int x, int y, Path.FillType ft, Paint paint) { canvas.save (); canvas.translate (x, y); canvas.clipRect (0, 0, 120, 120); canvas.drawColor (Color.WHITE); mPath.setFillType (ft); canvas.drawPath (mPath, paint); canvas.restore (); }
protected override void onDraw (Canvas canvas) { canvas.drawColor (Color.WHITE); RectF bounds = new RectF (); mPath.computeBounds (bounds, false); canvas.translate (10 - bounds.left, 10 - bounds.top); makeEffects (mEffects, mPhase); mPhase += 1; for (int i = 0; i < mEffects.Length; i++) { mPaint.setPathEffect (mEffects [i]); mPaint.setColor (mColors [i]); canvas.drawPath (mPath, mPaint); canvas.translate (0, 28); } }