Android PathDashPathEffect - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android PathDashPathEffect class.

This code example shows how to use the following methods:
		private static void makeEffects(PathEffect[] e, float phase) {
			e[0] = null; // no effect
			e[1] = new CornerPathEffect(10);
			e[2] = new DashPathEffect(new float[] { 10, 5, 5, 5 }, phase);
			e[3] = new PathDashPathEffect(makePathDash(), 12, phase,
					PathDashPathEffect.Style.ROTATE);
			e[4] = new ComposePathEffect(e[2], e[1]);
			e[5] = new ComposePathEffect(e[3], e[1]);
		} 
 
		public SampleView(Context context) {
			super(context);
			setFocusable(true); 
			setFocusableInTouchMode(true); 
 
			mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
			mPaint.setStyle(Paint.Style.STROKE);
			mPaint.setStrokeWidth(6);
 
			mPath = makeFollowPath();
4
CodeRank
This code example shows how to use the following methods:
		paint=new Paint(Paint.DITHER_FLAG);
		paint.setColor(Color.BLUE);
		paint.setStyle(Paint.Style.STROKE);
		Path p= new Path();
		p.addRect(0, 0, 2, 2, Path.Direction.CW);
		paint.setPathEffect(new PathDashPathEffect(p, 3, 2, PathDashPathEffect.Style.ROTATE));
		//������ 
		paint.setAntiAlias(true);
		paint.setDither(true);
		this.setImageBitmap(cacheBitmap);
	} 
	public void Init(byte[] data) {
		 
	} 
	//ȫѡ 
	public void selectAll() { 
		startX=0;
		startY=0;
		endX=0;
		endY=0;
4
CodeRank
This code example shows how to use the following methods:
        private static void makeEffects(PathEffect[] e, float phase) {
            e[0] = null;     // no effect
            e[1] = new CornerPathEffect(10);
            e[2] = new DashPathEffect(new float[] {10, 5, 5, 5}, phase);
            e[3] = new PathDashPathEffect(makePathDash(), 12, phase,
                                          PathDashPathEffect.Style.ROTATE);
            e[4] = new ComposePathEffect(e[2], e[1]);
            e[5] = new ComposePathEffect(e[3], e[1]);
        } 
 
        public SampleView(Context context) {
            super(context);
            setFocusable(true);
            setFocusableInTouchMode(true);
 
            mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
            mPaint.setStyle(Paint.Style.STROKE);
            mPaint.setStrokeWidth(6);
 
            mPath = makeFollowPath();
4
CodeRank
This code example shows how to use the following methods:
			e[0] = null; // û��Ч��
			e[1] = new CornerPathEffect(10);
			e[2] = new DashPathEffect(new float[]
			{ 20, 10, 5, 10 }, phase);
			e[3] = new PathDashPathEffect(makeCirclePath(), 12, phase,
					PathDashPathEffect.Style.ROTATE);
 
			e[4] = new ComposePathEffect(e[2], e[1]);
			e[5] = new ComposePathEffect(e[3], e[1]);
		} 
 
		public MyView(Context context)
		{ 
			super(context);
 
 
 
			paint = new Paint();
			paint.setStyle(Paint.Style.STROKE);
			paint.setStrokeWidth(5);
4
CodeRank
This code example shows how to use the following methods:
        private static void makeEffects(PathEffect[] e, float phase) {
            e[0] = null;     // 沒有效果
            e[1] = new CornerPathEffect(10);
            e[2] = new DashPathEffect(new float[] {10, 5, 5, 5}, phase);
            e[3] = new PathDashPathEffect(makePathDash(), 12, phase,
                                          PathDashPathEffect.Style.ROTATE);
            e[4] = new ComposePathEffect(e[2], e[1]);
            e[5] = new ComposePathEffect(e[3], e[1]);
        } 
         
        @Override  
        protected void onDraw(Canvas canvas) {
            canvas.drawColor(Color.WHITE);
 
            RectF bounds = new RectF();
            path.computeBounds(bounds, false);
            canvas.translate(10 - bounds.left, 10 - bounds.top);
 
            makeEffects(pathEff, phase);
            phase += 1;
4
CodeRank
This code example shows how to use the following methods:
 
		// navigational line style 
		paint = new Paint();
		paint.setAntiAlias(true);
		paint.setPathEffect(new PathDashPathEffect(makePathDash(), 12, 1,
				PathDashPathEffect.Style.ROTATE));
		paint.setColor(Color.BLUE);
		paint.setStyle(Paint.Style.STROKE);
		paint.setStrokeWidth(2);
	} 
 
	@Override 
	protected Treasure createItem(int i) {
		return treasures.get(i);
	} 
 
	@Override 
	public int size() { 
		return treasures.size();
	} 
4
CodeRank
This code example shows how to use the following methods:
			e[0] = null; // û��Ч��
			e[1] = new CornerPathEffect(10);
			e[2] = new DashPathEffect(new float[]
			{ 20, 10, 5, 10 }, phase);
			e[3] = new PathDashPathEffect(makeCirclePath(), 12, phase,
					PathDashPathEffect.Style.ROTATE);
 
			e[4] = new ComposePathEffect(e[2], e[1]);
			e[5] = new ComposePathEffect(e[3], e[1]);
		} 
 
		public MyView(Context context)
		{ 
			super(context);
 
 
 
			paint = new Paint();
			paint.setStyle(Paint.Style.STROKE);
			paint.setStrokeWidth(5);
4
CodeRank
This code example shows how to use the following methods:
 
public class BuildSnakeSurface {   // construct path effect for snake 
	public static int mSnakeGap;
	 
	public static PathEffect makeSnakePathEffect(int type ){
		return new PathDashPathEffect(makeSnakePathDash(type), 12,
				0,PathDashPathEffect.Style.ROTATE);
 
	} 
	 
	public static PathEffect makeSnakeHeadPathEffect(int type){
		return  new PathDashPathEffect(makeSnakeHeadPath(type ), 12,
				0,PathDashPathEffect.Style.ROTATE);
	} 
	 
 
	//snake surface 
    public static Path makeSnakePathDash(int type ) {
    	Path p = new Path();
       if (GameBasicSurfaceView.TILESIZE == 28){ 
4
CodeRank
See Code Examples for Android PathDashPathEffect Methods: