Code example for DashPathEffect

0
    public void onDraw(Canvas canvas) {
        // super.onDraw(canvas); 
        if (this._delayedSelected) {
            Paint p = new Paint();
            p.setARGB(255, 255, 255, 255);
            p.setPathEffect(new DashPathEffect(new float[] { 5, 5 }, 1));
            p.setStyle(Paint.Style.STROKE);
            canvas.drawRect(0, 0, this.getWidth() - 1, this.getHeight() - 1, p);
        } 
        canvas.save();
        canvas.rotate(this.currentDegree, this.getWidth() / 2, this.getHeight() / 2);
        canvas.scale(this.scale, this.scale);
        canvas.drawBitmap(bitmap, new Matrix(), null);
        canvas.restore();
    } 
 
    /** 
     * Deselects me as the current iamge being edited (makes me draw myself 
     * without a border). 
     */ 
    public void removeSelected() {