Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workaround for Paint.measureText in kitkat #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mcbyte-it
Copy link

Did a workaround to fix the issue of Paint.measureText in kitkat, I multiply by 1000 to bypass the Math.ceil issue before doing the real measureText then divide back by 1000.

Works on my project.

multiply by 1000 to bypass the Math.ceil issue
@LorenzGardner
Copy link

see comments in (#4)

This workaround is no longer sufficient as canvas.drawText has issues with small fonts. We likewise multiply the font size there, and scale the canvas as well.

it would probably be better to just change the scale of the entire canvas so instead of working on a 0 to 1 scale GaugeView would work on a 0 to 100 (or whatever) scale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants