zahid-ali-shah / SignatureView

SignatureView is an open source Android library which allow developers to produce pen and paper like effect for creating signatures on Android
Apache License 2.0
243 stars 68 forks source link

setBitmap may be is incorrect #11

Closed netstart closed 6 years ago

netstart commented 6 years ago

I think bellow code is incorrect

    public void setBitmap(Bitmap bitmap) {
        if (bmp!=null) {
            bmp=bitmap;
            canvasBmp = new Canvas(bitmap);
            postInvalidate();
        }
    }

I think the correct code should be

    public void setBitmap(Bitmap bitmap) {
        if (bitmap !=null) {
            bmp=bitmap;
            canvasBmp = new Canvas(bitmap);
            postInvalidate();
        }
    }
zahid-ali-shah commented 6 years ago

@netstart Good catch

zahid-ali-shah commented 6 years ago

Fixed in https://github.com/zahid-ali-shah/SignatureView/commit/b51ee7b3b2577835e5c6bbab5e39a4968defc68b. Closing this.