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

Positioning of tick-labels without rotation #226

Open
RayBreslin opened this issue Oct 15, 2021 · 3 comments
Open

Positioning of tick-labels without rotation #226

RayBreslin opened this issue Oct 15, 2021 · 3 comments

Comments

@RayBreslin
Copy link

RayBreslin commented Oct 15, 2021

Hello,

first of all I am a huge fan of this library and I realy enjoy using it.

Recently I came across a small problem, when it comes to properly positioning tick-labels on the outside of a circle-speedview when the rotation of the tick-labels is disabled (app:sv_tickRotation).

When the tick-padding is applied (app:sv_tickPadding), then by default - due to the handling in drawTicks() - you will get an unsymmetrical/uneven positioning around the speedview. That happens since all tick-labels - except position 0 - experience a different rotation depending on their placement around the circle.

So I made some minor modifications to the Speedometer-class (still using speedview-lib v1.3.1) that allows an individual configuration of the tick-paddings per tick-label in order to still achieve a symmetrical/even positioning.

Here is my git-patch - maybe someone will find it useful!

speedometer-tick-handling-adaption.txt

Note: In order to apply it, just rename the *.txt-file to a *.patch-file!
(I am sorry in advance for this unconventional way of proposing that change - still have to get used a bit more on how to properly add/show code-changes here.)

@RayBreslin RayBreslin added the Bug report Participants report a bug label Oct 15, 2021
@anastr
Copy link
Owner

anastr commented Oct 16, 2021

Hi @RayBreslin !
Since this's an old and Java version of the library I'm not sure I can help with that.

What're you trying to do, and what's the problem with the current positions and rotations of the ticks?

@RayBreslin
Copy link
Author

RayBreslin commented Oct 16, 2021

Hi @anastr,

maybe you missunderstood my posting - I already fixed the identified "bug" and proposed my solution for it, so that you can eventually consider it (the theory behind) as an enhancement for the ongoing development of your library.

Unfortunately I cant set any issue-labels myself so it was categorized as bug-report.

If you want to know what the initial problem was, I can make screenshots before/after my fix.

Regards

@anastr
Copy link
Owner

anastr commented Oct 16, 2021

Thanks for your contributing @RayBreslin .
It'd be nice to share a screenshot to look for it later on.

Best wishes.

@anastr anastr added enhancement and removed Bug report Participants report a bug labels Oct 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants