Acknowledged
over 1 year ago

setMatrix bug?

Had some affinetransforms which worked well in sim but not on my FR265 device (on-device log file reports ciq 4.2.4).

Wittled down to a test case which works in sim but not on device (bitmap not showing up how it should):

translateMatrix.initialize();
translateMatrix.setMatrix([
    1.0, 0.0, 0.0,
    0.0, 1.0, 0.0]);
dc.drawBitmap2(200, 200, myPngBitmap, {
  :transform => translateMatrix,
  :filterMode => Graphics.FILTER_MODE_BILINEAR
});

AFAIK it should be equal to the following code, which does work as expected on-device:

translateMatrix.initialize();
translateMatrix.setToTranslation(0.0, 0.0);
dc.drawBitmap2(200, 200, myPngBitmap, {
  :transform => translateMatrix,
  :filterMode => Graphics.FILTER_MODE_BILINEAR
});

I've had to change my real code from doing multiple operations in setMatrix/concatenate to using separate translate/scale/rotate operations.

Parents Comment Children
No Data