UTFT Lib and transparent bitmap
i have bitmaps defined such
i want draw them black (0x0000) transparent.
right i'm using myglcd.drawbitmap(x,y,width,height,knight) draw them.
i wondering if there function on looking draw them transparent or if can change value transparent or need try , work out own drawbitmap function transparent parts?
code: [select]
prog_uint16_t knight[255] progmem={
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x212c, 0x212c, 0x212c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x0010 (16) pixels
0x0000, 0x0000, 0x0000, 0x0000, 0x212c, 0x2d7b, 0x1c35, 0x1c35, 0x212c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x0020 (32) pixels
0x0000, 0x0000, 0x212c, 0x2d7b, 0x1c35, 0x1a70, 0x1a70, 0x1a70, 0x212c, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x0030 (48) pixels
0x0000, 0x212c, 0x1c35, 0x8222, 0xf56b, 0xc427, 0xc427, 0x5142, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, // 0x0040 (64) pixels
0x2061, 0x1a70, 0x5142, 0x2061, 0xf56b, 0x2061, 0x8222, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2061, 0x2061, 0x2061, 0x2061, // 0x0050 (80) pixels
0x212c, 0x5142, 0x8222, 0x8222, 0x8222, 0x5142, 0x2061, 0x0000, 0x0000, 0x0000, 0x2061, 0xc674, 0xffff, 0xffff, 0xffff, 0x2061, // 0x0060 (96) pixels
0x212c, 0x8222, 0xf56b, 0xc427, 0x1a70, 0xc674, 0x2061, 0x2061, 0x2061, 0x2061, 0x9532, 0xc674, 0x9532, 0x638c, 0x3a02, 0x2061, // 0x0070 (112) pixels
0x2061, 0x2061, 0x2061, 0x2061, 0x638c, 0x3a02, 0x2d7b, 0x2061, 0x2061, 0x3a02, 0x2061, 0x5142, 0x2061, 0x638c, 0xffff, 0xffff, // 0x0080 (128) pixels
0xc674, 0xc674, 0xc674, 0x3a02, 0x2061, 0x1c35, 0x2061, 0x0000, 0x2061, 0x8222, 0x8222, 0x2061, 0x3a02, 0xc674, 0x9532, 0x9532, // 0x0090 (144) pixels
0x9532, 0xc674, 0x2061, 0x5142, 0x1c35, 0x2061, 0x0000, 0x5142, 0x8222, 0x8222, 0x2061, 0x2061, 0x2061, 0x2061, 0x2061, 0x3a02, // 0x00a0 (160) pixels
0x2061, 0x2061, 0x2061, 0x1c35, 0x2061, 0x0000, 0x2061, 0x5142, 0x9532, 0xffff, 0x638c, 0x2061, 0x1c35, 0x2d7b, 0x1c35, 0x2061, // 0x00b0 (176) pixels
0x638c, 0x2061, 0x1a70, 0x2061, 0x0000, 0x2061, 0x2061, 0x9532, 0x638c, 0x2061, 0x1c35, 0x2d7b, 0x1a70, 0x1c35, 0x2061, 0x3a02, // 0x00c0 (192) pixels
0x2061, 0x1a70, 0x2061, 0x0000, 0x0000, 0x2061, 0x2061, 0x2061, 0x1a70, 0x2d7b, 0x1a70, 0x212c, 0x1a70, 0x2061, 0x2061, 0x212c, // 0x00d0 (208) pixels
0x1a70, 0x2061, 0x0000, 0x0000, 0x0000, 0x2061, 0x2061, 0x2061, 0x2061, 0x2061, 0x2061, 0x2061, 0x2061, 0x2061, 0x2061, 0x2061, // 0x00e0 (224) pixels
0x0000, 0x0000, 0x0000, 0x0000, 0x2061, 0x8222, 0x2061, 0x2061, 0x0000, 0x2061, 0x2061, 0x8222, 0x5142, 0x2061, 0x0000, 0x0000, // 0x00f0 (240) pixels
};
i want draw them black (0x0000) transparent.
right i'm using myglcd.drawbitmap(x,y,width,height,knight) draw them.
i wondering if there function on looking draw them transparent or if can change value transparent or need try , work out own drawbitmap function transparent parts?
i happy if transparent pixels possible don't believe utft library, or other tft lcd library matter.
what require ability have layers beyond cabability of arduino.
my solution change surounding pixels (the black 0x0000 in case) same colour background bitmap printed on.
what require ability have layers beyond cabability of arduino.
my solution change surounding pixels (the black 0x0000 in case) same colour background bitmap printed on.
Arduino Forum > Using Arduino > Programming Questions > UTFT Lib and transparent bitmap
arduino
Comments
Post a Comment