Skip to content

Instantly share code, notes, and snippets.

@rozek
Created January 10, 2020 06:59
Show Gist options
  • Save rozek/5e101ed5ef69696fe64511efb2aec843 to your computer and use it in GitHub Desktop.
Save rozek/5e101ed5ef69696fe64511efb2aec843 to your computer and use it in GitHub Desktop.
Bangle.js: draws two rotated bitmaps
Bangle.setLCDMode();
g.clear();
const Width = g.getWidth(), CenterX = Width/2;
const Height = g.getHeight(), CenterY = Height/2;
let HoursHandle = {
width:60, height:6, bpp:1,
buffer:require("heatshrink").decompress(atob("v//AAnvAwoAW+4GF/wA="))
};
g.drawImage(HoursHandle, CenterX,CenterY, {
rotate:2*Math.PI * 50/60, centerx:3,centery:3
});
let MinutesHandle = {
width:96, height:4, bpp:1,
buffer:require("heatshrink").decompress(atob("v//ABH+BRIANEZY="))
};
g.drawImage(MinutesHandle, CenterX,CenterY, {
rotate:2*Math.PI * 10/60, centerx:2,centery:2
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment