Code example for Path

Methods: closelineTomoveTo

0
            mFillPaint.setStyle(Paint.Style.FILL);
 
            mOval = new RectF(0.0f, 0.0f, 80.0f, 45.0f);
            mArc = new RectF(0.0f, 0.0f, 100.0f, 120.0f);
 
            mTriangle = new Path();
            mTriangle.moveTo(0.0f, 90.0f);
            mTriangle.lineTo(45.0f, 0.0f);
            mTriangle.lineTo(90.0f, 90.0f);
            mTriangle.close();
        } 
 
        @Override 
        protected void onDraw(Canvas canvas) {
            super.onDraw(canvas);
 
            canvas.save();
            canvas.translate(50.0f, 50.0f);
            canvas.drawRoundRect(mRect, 6.0f, 6.0f, mNormalPaint);
 
            canvas.translate(0.0f, 110.0f);