Acknowledged

Provide polyfill where needed in Toybox.Graphics.Dc API

Basically, there should be no "[view]" sections below any of Dc methods in the docs.

The context is as follows:

I really don't understand the thought process behind adding a DC method that is supported on just some devices.

What does Garmin expect to happen when someone arrives at a need to use, say, setFill(bitmap) and it's not supported on some (seemingly random) models?

It's not like my need to tile an area with a bitmap will suddenly go away because setFill is not available on VA5. Nor will I want to dumb down the design for some models. Some people might consider that OK, but imnsho that's an amateurish hackery.

The only thing that will happen, realistically, is that I will be re-implementing setFill() for devices that don't have it, i.e. I will be making a homebrew polyfill.

To put differently, these new and shiny API methods are effectively useless, unless someone just happens to be targeting specific models supported by them.

It's never the " Let's look what supports setFill and that will be our target model list ! "

It's always the " We want to do X, let's see if the API supports it for the devices we target ".

Parents
  • The requirements for drawBitmap2 and drawOffsetBitmap are a little different, so that's why the supported devices list is different when comparing the two.

    I don't have a lot of specifics, but I'll can try to summarize. The drawOffsetBitmap() method requires a GPU, so we limit it to GPU-only products—that's pretty straight-forward. However, drawBitmap2 will generally work fine on many products that don't have a GPU. For example, if a color palette is specified, something like a bitmap rotation would require a GPU to do the color mixing with surrounding pixels, so we throw exceptions in cases like this, but they aren't well-documented. There's a ticket open already to improve the documentation for this specific method to list out all of the exceptions.

Comment
  • The requirements for drawBitmap2 and drawOffsetBitmap are a little different, so that's why the supported devices list is different when comparing the two.

    I don't have a lot of specifics, but I'll can try to summarize. The drawOffsetBitmap() method requires a GPU, so we limit it to GPU-only products—that's pretty straight-forward. However, drawBitmap2 will generally work fine on many products that don't have a GPU. For example, if a color palette is specified, something like a bitmap rotation would require a GPU to do the color mixing with surrounding pixels, so we throw exceptions in cases like this, but they aren't well-documented. There's a ticket open already to improve the documentation for this specific method to list out all of the exceptions.

Children
No Data