8000 Rounding issue in setupInternalCanvasMatrix() · Issue #128 · Dimezis/BlurView · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Rounding issue in setupInternalCanvasMatrix() #128
Closed
@rabross

Description

@rabross

Version 1.6.5

There's a problem in setupInternalCanvasMatrix() where a rounding issue can occur causing internalCanvas and rootView sizes to not match. This leads to some blurring issues at the bottom of BlurView.

This is down to using roundingScaleFactor during internalCanvas.scale() for height instead of the 'real' height scale factor.

I've fixed on my side by producing:
float nonRoundingScaleFactorHeight = (float) rootView.getHeight() / internalCanvas.getHeight();
and using that for scaling:
internalCanvas.scale(1 / scaleFactor, 1 / nonRoundingScaleFactorHeight);

It might be worth looking into.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0