RobertWarrenGilmore / stylin-24-7-watch-face

a 24-hour watch face with 12 at the top
0 stars 0 forks source link

The sun and moon expand beyond the edges of the day and night sectors if the sectors are small. #5

Closed RobertWarrenGilmore closed 3 years ago

RobertWarrenGilmore commented 3 years ago

Possible solutions:

RobertWarrenGilmore commented 3 years ago

Also, what do we do about the arctic?

RobertWarrenGilmore commented 3 years ago

It's possible to do the masking approach!

The draw method is starting to do a lot, so maybe everything but the hands should be cached as a bitmap and reapplied in one go on each frame. The watch face service would need to listen to any change that would affect the background or the ticks (settings, properties, ambient mode, location, size change, maybe more) and invalidate the painter.

Also consider that the palette is passed in on draw. Perhaps it should be a field on the painter instead, so that the painter caches an image for each palette and invalidates the cache when either of its palette fields (ambient or interactive) is changed.

RobertWarrenGilmore commented 3 years ago

Canvas.clipPath might be a simpler alternative.