Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by rbx-multiplex - 2007-01-28
Last edited by midgey34 - 2007-08-04

FS#6583 - Hour Hand in Full Screen Clock

The new(ish) clock that auto scales to all target sizes was using the old fixed array for the hour hand in full screen mode so it wasn’t correct

I have fixed that and while I was there I also tidied up the trigonometry and made the hands more solid and tweaked the lengths.

Patch is my ‘fixes’

   patch (10.8 KiB)
Closed by  midgey34
2007-08-04 03:20
Reason for closing:  Out of Date
Additional comments about closing:  

Recent changes to the clock plugin make this patch obsolete.

MikeS commented on 2007-02-02 17:20

Hmm..fsincos?

Hi! (I’m the author of the clock plugin).

Nice timing with this, as I recently (about a week ago) began working on a much better-scaling, better-looking clock update (hint: stupid “8 surrounding pixels” hour/minute hands are looking a lot lot better). I’m nearly completely done with it now, you should see it in SVN this weekend most likely, and much of this code is now unnecessary. However, I do like the changes pertaining to directly using “second” and “minute” instead of a confusing “pos” and the hour = 2/3 minute seems like a great length to me.

Therefore I’d like to take a few of these changes and implement them at some point. However, for this, I need your full name to give you credit… :)

Thanks for your work.

Hi Zakk

use anything you find useful, discard the rest, I was thinking about trying for triangular hands with coulour (and ORing them) like the XClock

THe drawing from all the 8 pixels around the centre for the hands is a clodge, it would be quite easy to add a bunch of if statements to only draw the needed lines - not sure what you mena by the “stupid” 8 surrounding pixels comment though - I was toying with tracking down an efficient routine for drawing triangles but to be honest I have an H300 so can only see the display when the battery draining back light is on so am not a big user of the clock - it’s nice though.

My real name is already in the credits list - Ian Webber, I played arround with the Replay Gain tag

Sorry Mike, I don’t understand your comment

Ah - now I do, there were some fixed point trig routines added to the Plugin-API, thse should be used - you’re right (and why did that only occur to me 500mS after clicking the add comment button)

Haha, sorry, I didn’t mean it to sound like that. By “stupid” I meant pretty much what you said - a clodge, a hack that doesn’t work out too well. I’m now using the xlcd plugin library we’ve got in SVN (did you know about that?) to draw triangular hands instead of using a 6-point or 8-point drawline system, and it looks better.

If you wanted something to do, I/we/Rockbox plugins could really use an antialiased line implementation in the plugin library or so. I’m currently drawing a slightly bigger, but lighter, triangle underneath the clock hands in order to sorta fake antialiasing.. it doesn’t look too bad, but I think it could look way better. Antialiased lines would definitely look nice if you had any ideas for that.

Thanks again for your work, I’ll continue on the clock tonight and maybe I can have it ready for SVN on sunday.

No worries - I didn’t take any offence, I just didn’t understand - it was just a bit of tidying up the visual once I’d done the hour hand position stuff - I agree that it was a pretty poor way of doing it.

Talking of anti-aliasing, what might be possible is to give the hands a 3D feel by drawing each hand from 3 triangles each a slightly differnt brightness …

I did a search for likely strings for triangles but didn’t find any, must go look at xlcd - will it be in the source download?
(I haven’t sorted out SVN access)

I’ll have a look for anti aliasing but don’t hold your breath !

Giving the hands a 3D feel would be great, but I don’t think simple triangles will allow anything very nice looking to happen. The xlcd lib does come with any source you download or checkout - look in apps/plugins/lib/xlcd.h to see what it’s capable of (triangles and some bitmap stuff, not too much).

I’ll continue screwing with it, and hopefully I’ll get something that looks decent. [fantasy: what we could really use is some sort of bitmap rotating feature.. I’d love to create a minute hand in Photoshop and just have it rotate. That’s too much to ask, though :)]

I have a working implementation of an anti-aliased line (which uses  FS#7022  for transparency).

It needs some more work and cleanup, but when it’s finished, I’ll commit a patch.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing