setAntiAlias on Edge 530 simulator

I'm trying out the new setAntiAlias on an Edge 530 simulator but  my (Toybox.Graphics.Dc has :setAntiAlias) return false. Is it supposed to work? The SDK manager says 3.2.3 and the device image is the newest available

  • I tried the same test in the simulator and it seems that setAntiAlias is available for 3.2 watches but not 3.2 Edge devices.

    Other people are seeing the same thing: https://forums.garmin.com/developer/connect-iq/f/discussion/250892/setantialias-on-edge1030---is-it-supposed-to-work-on-this-device/1194219

    Might want to file a bug and at least find out if it's intended behavior.

  • We know about this issue. This device should have antialiasing support in the simulator and on device. Unfortunately, we didn't fully enable it.

  • The issue should be resolved now. We also pushed a new version of the SDK manager.

    If you open up the SDK manager, you should be prompted to download and install a new version. Once you've done that, go ahead and update the devices. You should see that anti-aliasing support is enabled for edge530/830/1030.

  • Thanks, the simulator works now.

    I also think it see the change on the device or are my eyes deceiving me because there was only an update to the simulator image and the SDK manager and no actual new SDK version or Edge firmware so how could that be possible? Or did it actually work on the actual device all the time and I just didn't look carefully enough (smaller pixels)?

  • This is kinda complicated, so I won't go into a bunch of detail. If everything was done correctly, the latest firmware for your device should support the ConnectIQ version specified in the compiler.json file (%APPDATA%\Garmin\ConnectIQ\Devices\edge530\compiler.json).

    This is what I'm seeing in that file...

        "partNumbers": [
            {
                "connectIQVersion": "3.2.4",
                "firmwareVersion": 700,
                "languages": [
                ],
                "number": "006-B3121-00"
            },

    This says that part number 006-B3121-00 (edge530 world wide) firmware version 7.00 has ConnectIQ 3.2.4 support. This should include antialiasing support. If the expression (Dc has :setAntiAlias) returns true, the functionality should work. You can use this check on both simulator and device and get the correct result on both devices and the simulator.

    It is pretty easy to verify AA is working properly with a simple app like this.

    using Toybox.Application;
    using Toybox.WatchUi;
    using Toybox.Graphics;
    
    class AntiAliasDelegate extends WatchUi.BehaviorDelegate {
    
        hidden var mView;
    
        function initialize(view) {
            BehaviorDelegate.initialize();
            mView = view;
        }
    
        function onSelect() {
            mView.toggleAntiAlias();
            return true;
        }
    
    }
    
    class AntiAliasView extends WatchUi.View {
    
        hidden var mAntiAlias;
    
        function initialize() {
            View.initialize();
            mAntiAlias = false;
        }
    
        function onUpdate(dc) {
            dc.setColor(Graphics.COLOR_BLACK, Graphics.COLOR_WHITE);
            dc.clear();
    
            var cx = dc.getWidth() / 2;
            var cy = dc.getHeight() / 2;
            var r = (cx < cy ? cx : cy) * 2 / 3;
    
            var text = "N/A";
            if (dc has :setAntiAlias) {
                dc.setAntiAlias(mAntiAlias);
                text = mAntiAlias ? "Yes" : "No";
            }
    
            dc.drawCircle(cx, cy, r);
    
            dc.drawText(cx, cy, Graphics.FONT_TINY, text, Graphics.TEXT_JUSTIFY_CENTER | Graphics.TEXT_JUSTIFY_VCENTER);
        }
    
        function toggleAntiAlias() {
            mAntiAlias = !mAntiAlias;
            WatchUi.requestUpdate();
        }
    }
    
    class AntiAliasApp extends Application.AppBase {
    
        function initialize() {
            AppBase.initialize();
        }
    
        function getInitialView() {
            var view = new AntiAliasView();
            return [ view, new AntiAliasDelegate(view) ];
        }
    
    }