Ticket Created
over 4 years ago

WERETECH-10768

venu sq trouble with BufferedBitmap

according to problems describes in

https://forums.garmin.com/developer/connect-iq/f/discussion/253187/venu-and-venu-sq-differences

I think that venu sq doesn't support BufferedBitmap.

The strange is that I was sure I posted this bug erly but can find it (maybe still problems with forums)

Parents
  • Yes it support because I can create but not run as on all other types of devices.

    I think that is a problem with colours/palette, Everything was described in https://forums.garmin.com/developer/connect-iq/f/discussion/253187/venu-and-venu-sq-differences

    but I repeat

    - error is Error Name: Symbol Not Found Error when I call setColour...

    - I have 12 controls where 8 are based on buffered bitmaps and all produce errors:

    - I don't have venu sq tests was done by user

    - when I made deep tests using ciq api watch reset and it ended test

    pseudo code:

    //globals
    gDC = GRA.COLOR_DK_GRAY;
    gBC = GRA.COLOR_BLACK;
    const P_NUM		= 8;
    var PAL_COL =
    [
    	0x00AAFF,//00
    	0x00FF00,//01
    	0x55FF00,//02
    	0xAAFF00,//03
    	0xFFAA00,//04
    	0xFF5500,//05
    	0xFF0000,//06
    	0xFF00AA //07
    ];
    
    //class functions
    function mBuff()
    {
        var palette = new [P_NUM + 2];
        palette[0] = gBC;		
        palette[1] = gDC;
        
        				
        for(var i=0; i<P_NUM; i++)
        {
        	palette[i+2] = PAL_COL[i];
        }
        					
        mBuf = null;
        mBuf = new GRA.BufferedBitmap(
        {
        	:width => mWbmp + mFrameThickness,
        	:height => mHbmp + mFrameThickness,
        	:palette => palette
        });
    }
    
    function draw(dc)
    {
        mBuff();
        //obtaining dc
        var d = mBuf.getDc();
        d.setColor(gBC, gBC);
        d.clear();
        
        //drawing
        drawP(d,....);
        //....
        dc.drawBitmap(mBpmX, mBmpY, mBuf);
    }
    
    //function drawP(dc,....)
    {
      dc.setColor(mPalCol, gBC);//ERROR
    }

Comment
  • Yes it support because I can create but not run as on all other types of devices.

    I think that is a problem with colours/palette, Everything was described in https://forums.garmin.com/developer/connect-iq/f/discussion/253187/venu-and-venu-sq-differences

    but I repeat

    - error is Error Name: Symbol Not Found Error when I call setColour...

    - I have 12 controls where 8 are based on buffered bitmaps and all produce errors:

    - I don't have venu sq tests was done by user

    - when I made deep tests using ciq api watch reset and it ended test

    pseudo code:

    //globals
    gDC = GRA.COLOR_DK_GRAY;
    gBC = GRA.COLOR_BLACK;
    const P_NUM		= 8;
    var PAL_COL =
    [
    	0x00AAFF,//00
    	0x00FF00,//01
    	0x55FF00,//02
    	0xAAFF00,//03
    	0xFFAA00,//04
    	0xFF5500,//05
    	0xFF0000,//06
    	0xFF00AA //07
    ];
    
    //class functions
    function mBuff()
    {
        var palette = new [P_NUM + 2];
        palette[0] = gBC;		
        palette[1] = gDC;
        
        				
        for(var i=0; i<P_NUM; i++)
        {
        	palette[i+2] = PAL_COL[i];
        }
        					
        mBuf = null;
        mBuf = new GRA.BufferedBitmap(
        {
        	:width => mWbmp + mFrameThickness,
        	:height => mHbmp + mFrameThickness,
        	:palette => palette
        });
    }
    
    function draw(dc)
    {
        mBuff();
        //obtaining dc
        var d = mBuf.getDc();
        d.setColor(gBC, gBC);
        d.clear();
        
        //drawing
        drawP(d,....);
        //....
        dc.drawBitmap(mBpmX, mBmpY, mBuf);
    }
    
    //function drawP(dc,....)
    {
      dc.setColor(mPalCol, gBC);//ERROR
    }

Children
No Data