1.1 --- a/FutabaGP1212A02.cpp Sat Sep 06 18:39:49 2014 +0200
1.2 +++ b/FutabaGP1212A02.cpp Sun Sep 21 19:10:08 2014 +0200
1.3 @@ -221,16 +221,19 @@
1.4
1.5 /**
1.6 */
1.7 -void GP1212A02A::SetPixel(unsigned char aX, unsigned char aY, bool aOn)
1.8 +void GP1212A02A::SetPixel(unsigned char aX, unsigned char aY, unsigned int aPixel)
1.9 {
1.10 //
1.11 //int byteOffset=(aX*HeightInPixels()+aY)/8;
1.12 //int bitOffset=(aX*HeightInPixels()+aY)%8;
1.13 //iNextFrame[byteOffset] |= ( (aOn?0x01:0x00) << bitOffset );
1.14
1.15 + //Pixel is on if any of the non-alpha component is not null
1.16 + bool on = (aPixel&0x00FFFFFF)!=0x00000000;
1.17 +
1.18 if (iOffScreenMode)
1.19 {
1.20 - if (aOn)
1.21 + if (on)
1.22 {
1.23 iFrameNext->SetBit(aX*HeightInPixels()+aY);
1.24 }