Code example for RoundRectShape

0
             
            dwShape = new ShapeDrawable[7];
            dwShape[0] = new ShapeDrawable(new RectShape());
            dwShape[1] = new ShapeDrawable(new OvalShape());
            dwShape[2] = new ShapeDrawable(
            		         new RoundRectShape(outerR, null,null));
            dwShape[3] = new ShapeDrawable(
            				 new RoundRectShape(outerR, inset,null));
            dwShape[4] = new ShapeDrawable(
            				 new RoundRectShape(outerR, inset,innerR));
            dwShape[5]= new ShapeDrawable(new PathShape(path, 100, 100));
            dwShape[6] = new ShapeDrawable(new ArcShape(45, -270));
            
            SdmakeSweep=new SweepGradient(150, 25,
                new int[] { 0xFFFF0000, 0xFF00FF00, 0xFF0000FF, 0xFFFF0000 }, 
                null); 
            SdmakeLinear=new LinearGradient(0, 0, 50, 50,
                new int[] { 0xFFFF0000, 0xFF00FF00, 0xFF0000FF }, 
                null, Shader.TileMode.MIRROR);
 
            int[] pixels = new int[]{0xFFFF0000, 0xFF00FF00, 0xFF0000FF, 0};