Rounding issue in setupInternalCanvasMatrix()
See original GitHub issueVersion 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:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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 workI’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