Hi,
could Garmin guys add a function to read a pixel value in the SDK, please ?
I'm really missing this function to make Antialiasing.
Thanks a lot,
Hi,
I'm making an analog watchface using the Graphics Api (drawLine,FillPoly,FillCircle, ..) and I'd like to antialias those primitives once they are drawn.
I know there is already built-in antialiasing for fonts but not for primitives drawing... That's why...
Thanks,
The closest thing we have that would fit some of what you're looking for is Graphics::Dc::drawPoint(). Since your goal is attaining the ability to anti-alias graphics, I'll speak to that briefly.
Anti-aliasing graphics on the device would impose a huge performance hit on anything drawn to the screen because our devices simply don't have the power to do anti-aliasing quickly. It's not completely off the table--we may add anti-aliasing of graphics sometime in the future--but if we did, it would be something we'd take time to do carefully to make sure we're doing things efficiently as possible. In the short term, however, this is not something we plan to add to the SDK.
Doing pixel operations on the display is not something we are going to be able to support at this time. The Virtual Machine is simply too slow to support this type of an interface. You may see some posts around here where other developers are trying to optimize the way they handle graphics calls to prevent sluggish behavior and excess battery drain on the device. These issues can arise when making a large number of graphics calls, which handle all the pixel operations for drawing shapes in the native graphics driver. This is a feature we can consider for higher powered systems in the future, but doing pixel operations through the VM on our wearables, is just not feasible.
So please, add the function and let decide the user and the developer of what they want to see on their watch !
How many pixels can you modify in a single call before you get a watchdog timeout? If you had 'getPixel' would you actually be able to do your proposed anti-aliasing without running into problems? I realize you could reduce the area to apply the technique to, or apply it to small blocks at a time, but I have serious doubts that it would actually be workable.
Lets assume for a second that you can successfully read/write pixel data. Many devices only support 16 colors, so you aren't going to get very good control over the output (e.g., if you draw an orange line, what color are you planning to twiddle the edges to).
I've never considered trying to implement anti-aliasing, and I'm not even sure how you'd achieve it with just a single frame buffer. Are you planning to implement some sort of full-screen anti-aliasing (blur), or are you wanting to just draw a primitive, then walk the entire screen looking for pixels of the color of that primitive, and then modifying the adjacent ones that should be modified?
Travis