Skip to content

Positioning of tick-labels without rotation #226

@RayBreslin

Description

@RayBreslin

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.)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions