question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rounding issue in setupInternalCanvasMatrix()

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Dimeziscommented, Jan 27, 2021

@Mickey34 rootView height shouldn’t be used, it’s just that the OP has rootView and BlurView of the same size. You should use BlurView’s height to make that trick work

1reaction
Dimeziscommented, Jan 26, 2021

I’m not sure what to do here TBH. It’s obviously a bug and looks bad, however your fix is potentially squeezing/stretching the resulting image on the vertical axis. On the blurred version it’s not that noticeable, so I might go for it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rounding issue - Anaplan Community
Hello, I'm having an issue in which a sum of rounded items is still showing some unexpected decimals. See screenshot below.
Read more >
Rounding issue with Excel - Microsoft Community Hub
I have Microsoft 365 and I have a problem with calcuating from one column to another. If I do a calculation such as...
Read more >
Rounding error when using INT function - excel - Stack Overflow
This appears to be a problem with Excel's calculation and significant digits. If you do: =120.3 - 120 and format the cell to...
Read more >
What is rounding error? | Definition from TechTarget
Rounding error is the difference between a rounded-off numerical value and the actual value. A rounded quantity is represented by a numeral with...
Read more >
Rounding Issue ( I think) - Microsoft Power BI Community
Solved: Hi In my data the Orginal value and New AFP Value columns have a number of decimal places. I used the rounding...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found