Good morning!
I was just experimenting with image rotation when I found the following problem:
if you drawImage an image including rotation and a non-default centerx/centery, the image gets cut in half.
drawImage
centerx
centery
Try
Bangle.setLCDMode(); g.clear(); const Width = g.getWidth(), CenterX = Width/2; const Height = g.getHeight(), CenterY = Height/2; let MinutesHandle = { width:96, height:4, bpp:1, buffer:require("heatshrink").decompress(atob("v//ABH+BRIANEZY=")) }; g.drawImage(MinutesHandle, CenterX,CenterY); g.drawImage(MinutesHandle, CenterX,CenterY, { rotate:Math.PI*10/180, centerx:2,centery:2 });
in emulator or on watch and see what I mean.
@Andreas_Rozek started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Good morning!
I was just experimenting with image rotation when I found the following problem:
if you
drawImage
an image including rotation and a non-defaultcenterx
/centery
, the image gets cut in half.Try
in emulator or on watch and see what I mean.