Code example for ComposePathEffect

Methods: setPathEffect

0
			mDrawables[5].getPaint().setShader(makeTiling());
			mDrawables[6].getPaint().setColor(0x88FF8844);
 
			PathEffect pe = new DiscretePathEffect(10, 4);
			PathEffect pe2 = new CornerPathEffect(4);
			mDrawables[3].getPaint().setPathEffect(
					new ComposePathEffect(pe2, pe));
 
			MyShapeDrawable msd = (MyShapeDrawable) mDrawables[6];
			msd.getStrokePaint().setStrokeWidth(4);
		} 
 
		@Override 
		protected void onDraw(Canvas canvas) {
 
			int x = 10;
			int y = 10;
			int width = 300;
			int height = 50;
 
Experience pair programming with AI  Get Codota for Java