Tuto or code to make an anti-aliasing watchface?

Hello, I'm looking for tutorial or source code to make a watchface with anti-aliasing on all needles.
I understood that we must use a font to draw the needles. But we have to do all the angles?
Why anti-aliasing is only for fonts?

In short I am a little lost, I understood via the example of Garmin how to do for seconds but hey I found nothing to make a watchface that is correct.

Thank you in advance.

  • bufferedbitmaps don't support anti-aliased resources so it's not possible to store these elements in your buffer.

  • hi,

    (i'm not an English speaker)

    could you please explain me with simple word what is the interest of "bufferedbitmaps " and how to use it?

    I looked at the API doc and inside some exemple but I don't get it at all.

    have a great day

  • It's mainly used as a way to make drawing cheaper, if you need to keep drawing the same things multiple times.

    E.g. with an analog watchface with 1hz seconds you could do this every second (onPartialUpdate):

    • Draw over previous second hand by:
      • Draw background
      • Draw hour hand
      • Draw minute hand
      • (3 draws, so expensive)
    • Draw new second hand

    Or you can do this instead:

    • Draw over previous second hand by:
      • Draw the buffered bitmap to screen
      • (1 draw, so cheaper)
    • Draw new second hand

    So long as you have already made sure that your buffered bitmap contains a copy of your background + hour hand + minute hand (by drawing background, drawing hour hand, drawing minute hand to it). And you only do this as little as necessary, e.g. once per minute in onUpdate, and then use it 60 times.

    So it's cheaper drawing, but more expensive in memory.

  • Huge thanks for this outstanding explanation ! Now I get it !

    Always the same problem, ressource memory. 

    The 1hz code, in my opinion it is just a code challenge, my priorities are battery and memory, so for me is. Non sense to want for exemple hr always on even if you dont look At the wf. 

    But pretty sure the bufferBitmap method is great to save battery. 

    Many thanks again. 

  • bufferedbitmaps don't support anti-aliased resources so it's not possible to store these elements in your buffer.

    I think you might have meant:

    bufferedbitmaps that aren't using the full colour palette don't support anti-aliased resources...