Closed RobertWarrenGilmore closed 3 years ago
Also, what do we do about the arctic?
It's possible to do the masking approach!
Paint.setXferMode
to paint the sun and moon only within their respective sectors.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.
Canvas.clipPath
might be a simpler alternative.
Possible solutions: