Complete

4.0 devices use a Graphics Pool. 

https://developer.garmin.com/connect-iq/api-docs/Toybox/Graphics.html#createBufferedBitmap-instance_function

Is the documentation for creating a buffered bitmap on API Level 4.0.0 devices.

Problem with BufferedBitmap (API level 4.0.x)

When trying to compile my code for Fenix 7 devices (target API level 4.0.x) I'm getting the following error:

Error: Symbol Not Found Error
Details: Failed invoking <symbol>
Stack:
- onLayout() at G:\CIQ\TactixFace\source\TactixFaceView.mc:91 0x10000185

It is related to the part of the code, where an offscreen buffer is defined (see below). I can't see any error in the code, it works fine with all previous devices and API levels, and it is also consistent with the current API documentation. Has anybody else experienced similar issues with the new CIQ SDK (4.0.7)? How can be this resolved? I'll be grateful for any feedback.

The code:

using Toybox.Graphics as Gfx;

var offscreenBuffer;

var buffer_size;

// offscreenBuffer size
buffer_size = dc.getWidth();

// allocate the buffer for drawing
if( Gfx has :BufferedBitmap ) {
  offscreenBuffer = new Gfx.BufferedBitmap({
   :width=>buffer_size,
   :height=>buffer_size,
   :palette=>[]
  });

} else {
  offscreenBuffer = null;
}

Parents
  • The problem is in CIQ 4 the Graphics module reports true to has :BufferedBitmap even though it does not leading to an error despite checking for it.

    Although allocating the error is not trapped with try catch else. 

    I have to test for the MonkeyC version and see if it is 4 or more as a work around.

    Usual Garmin sloppy development.

Comment
  • The problem is in CIQ 4 the Graphics module reports true to has :BufferedBitmap even though it does not leading to an error despite checking for it.

    Although allocating the error is not trapped with try catch else. 

    I have to test for the MonkeyC version and see if it is 4 or more as a work around.

    Usual Garmin sloppy development.

Children
No Data