Ticket Created
over 3 years ago

WERETECH-11737

red circle drawn around 390x390 round devices in the simulator

Hey, I am working a few days around my new watch face design and there's a problem I've encountered only in the Venu and the Venu Mercedes-Benz edition, I've used

dc.setColor(Graphics.COLOR_BLACK, Graphics.COLOR_TRANSPARENT);
        dc.drawCircle(dc.getWidth()/2, dc.getHeight()/2, dc.getWidth()/1.8);
        dc.fillCircle(dc.getWidth()/2, dc.getHeight()/2, dc.getWidth()/1.8);
to get a black background (the reason for the /1.8 was because I had the problem with other devices but using '/1.8' instead of '/2' solved it). In those devices I get a red circle around the device's screen: https://ibb.co/4ZZcnqT (kinda hard to see but I afraid that if the problem is not with the simulator, then it will be really clear in real life and I will get bad reviews for this). Did anyone else encountered the same problem, anyone knows how to solve it? 

Also if anyone has a Venu or Venu Mercedes-Benz edition and can check for me if this problem occurs in real life device and not only in the simulator It will be really appreciated. Here's the link to the prg file - https://filebin.net/pfnfwpy1kkqi5nab .

TY in advance for anyone that will try to help! It is the very last thing I need to fix before uploading it to the connect iq shop!

  • Hey Flowstate, ty for trying to help! I deleted the comment with the full project because I didn't see your comment before I uploaded it. Meanwhile you did all of that, what I've managed to do was trying the 4 circles method. I did it as followed:
     function onUpdate(dc as Dc) as Void {
            dc.setColor(Graphics.COLOR_BLACK, Graphics.COLOR_BLACK);
            dc.clear();
            dc.setPenWidth(20);
            dc.drawCircle(dc.getWidth() /2, dc.getHeight() /2, dc.getWidth() / 1.8);
            dc.fillCircle(dc.getWidth() /2, dc.getHeight() /2, dc.getWidth() / 1.8);
            if (dc.getWidth() == 390) {
            dc.drawCircle(195, 195, 98);
            dc.fillCircle(195, 195, 98);
            dc.drawCircle(195, 196, 98);
            dc.fillCircle(195, 196, 98);
            dc.drawCircle(196, 195, 98);
            dc.fillCircle(196, 195, 98);
            dc.drawCircle(196, 196, 98);
            dc.fillCircle(196, 196, 98);}
    since the watch face in venu is 390 pixels so the center is in 195,196 so I tried the method, yet no success with moving it. I will try to bug report it. About your other conclusions, I tried to not use the circle but without doing it the numbers in the clock just went one on each other so I used it only for this reason
  • I tried changing your code to get rid of drawCircle(), and yep, the weird circle is still there:
        function onUpdate(dc as Dc) as Void {
            dc.setColor(Graphics.COLOR_BLACK, Graphics.COLOR_BLACK);
            dc.clear();
    		dc.setPenWidth(1);
    		
            var clockTime = System.getClockTime();
    
    I modded the Analog SDK sample so it runs for Venu, and I see the same problem (in the sim). To make it clearer, I changed the code so it just displays a black background (although I see the problem either way)
        public function onUpdate(dc as Dc) as Void {
            dc.setColor(Graphics.COLOR_BLACK, Graphics.COLOR_BLACK);
            dc.clear();
            return;
    
    /resized-image/__size/320x240/__key/commentfiles/fb5d84b10a5745448a7a45dafc1faa43-6e81f76c-4019-4ee1-9f89-903b0c272bdb/pastedimage1633390943753v1.png I think this makes it pretty clear that this is likely a simulator issue -- if you have a chance, you could file a bug report.
  • This situation doesn't seem to actually require drawing a circle. 1) As Jim pointed out, you should set the colors before you call dc.clear() 2) Even though the screen is physically a circle, you should be able to draw outside of the circular bounds of display anyway (at least horizontally). e.g. if you wanted to manually clear the screen with a given color without using dc.clear() for some reason, you could just draw a 390 x 390 square (but it's easier to use dc.clear()) 3) If you ever have issues drawing an actual circle due to the fact that the displays all have even numbers of pixel width/height, the solution is not to divide the width by 1.8, but it's to draw 4 overlapping circles: forums.garmin.com/.../dc-drawcircle-inside-screen-edge-even-numbered-screen-height-width
  • No, first I used dc.clear() and only in the 3rd line of the onUpdate() I used the dc.setColor
  • Have you set the colors before the dc.clear()? dc.setColor(Graphics.COLOR_BLACK, Graphics.COLOR_BLACK); dc.clear() for example..