Skip to content

the blurview draw the overlayColor is incorrect #203

Open
@ncwuguowei

Description

@ncwuguowei

Please include:

  1. Library version
    master branch
    2). the blurview draw the overlayColor is incorrect.
    PreDrawBlurController#public boolean draw(Canvas canvas) {
    ....
    canvas.restore();
    // NOTE: need delete there, because only draw overlayColor to blurView content.
    // current canvas.drawColor(overlayColor) will cause the whole canvas(decorView) draw the overlayColer
    if (overlayColor != TRANSPARENT) {
    canvas.drawColor(overlayColor);
    }
    return true;
    }

and method blurAndSave() to add draw overlayColor ,mix to bulred bitmap

private void blurAndSave() {
    internalBitmap = blurAlgorithm.blur(internalBitmap, blurRadius);
    if (!blurAlgorithm.canModifyBitmap()) {
        internalCanvas.setBitmap(internalBitmap);
    }
    //NOTE: modify only draw overlayColor to blurView content
    if (overlayColor != TRANSPARENT) {
        internalCanvas.drawColor(overlayColor);
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions