Ticket Created
over 4 years ago

CIQQA-377

SDK 4.0.2 simulator - buffered bitmaps colors only black and white

The simulator does not display the correct color palette for buffered bitmaps.

When I build for a F6X and SDK 3.2.0 and start the simulator all buffered bitmaps only use black and white.

Code sample:

function bufferedBitmapFactory(options as {:width as Number, :height as Number, :palette as Array<ColorType>, :colorDepth as Number, :bitmapResource as WatchUi.BitmapResource}) as BufferedBitmapReference or BufferedBitmap {
        if (Graphics has :createBufferedBitmap) {
            return Graphics.createBufferedBitmap(options);
        } else {
            return new Graphics.BufferedBitmap(options);
        }
    }
    
function createBufferedBitmaps() {
        buffer1 = bufferedBitmapFactory({:width=>10, :height=>10, :palette=>[color1, color2, color3, color4]});
        buffer2 = bufferedBitmapFactory({:width=>10, :height=>10, :palette=>[color1, color2, color3]});
        buffer3 = bufferedBitmapFactory({:width=>20, :height=>20, :palette=>[color1, color2, color3, color4, color5]});
    }

  • Hi, the code exist since 2 years and works perfectly until sdk version v4.x. The screen dc is cleared correctly in onUpdate.

    Is it also needed to clear the dc of all newly created buffered bitmaps? (since sdk v4.x?)

    What about my question above with the color palette issues with the strange behaviour when you change the color order in the palette?

    I think the problem is related to the transparent color in the buffered bitmap color palette. Can you please verify that? Thanks.

    An example code for a f6x (sdk 3.x device) coded with sdk v4.0 would be nice. If the code is like the older skd(s) then it is not needed, but please provide some support for the not working simulator.

  • Hi, the code exist since 2 years and works perfectly until sdk version v4.x. The screen dc is cleared correctly in onUpdate.

    Is it also needed to clear the dc of all newly created buffered bitmaps? (since sdk v4.x?)

    What about my question above with the color palette issues with the strange behaviour when you change the color order in the palette?

    I think the problem is related to the transparent color in the buffered bitmap color palette. Can you please verify that? Thanks.

    An example code for a f6x (sdk 3.x device) coded with sdk v4.0 would be nice. If the code is like the older skd(s) then it is not needed, but please provide some support for the not working simulator.

  • Hi, the code exist since 2 years and works perfectly until sdk version v4.x. The screen dc is cleared correctly in onUpdate.

    Is it also needed to clear the dc of all newly created buffered bitmaps? (since sdk v4.x?)

    What about my question above with the color palette issues with the strange behaviour when you change the color order in the palette?

    I think the problem is related to the transparent color in the buffered bitmap color palette. Can you please verify that? Thanks.

    An example code for a f6x (sdk 3.x device) coded with sdk v4.0 would be nice. If the code is like the older skd(s) then it is not needed, but please provide some support for the not working simulator.

  • Hi, the code exist since 2 years and works perfectly until sdk version v4.x. The screen dc is cleared correctly in onUpdate.

    Is it also needed to clear the dc of all newly created buffered bitmaps? (since sdk v4.x?)

    What about my question above with the color palette issues with the strange behaviour when you change the color order in the palette?

    I think the problem is related to the transparent color in the buffered bitmap color palette. Can you please verify that? Thanks.

    An example code for a f6x (sdk 3.x device) coded with sdk v4.0 would be nice. If the code is like the older skd(s) then it is not needed, but please provide some support for the not working simulator.