Merge pull request #95 from reaper7/master

new feature NeoRbgFeature
This commit is contained in:
Michael Miller
2016-04-06 10:49:05 -07:00

View File

@@ -181,3 +181,28 @@ public:
return color;
}
};
class NeoRbgFeature : public Neo3Elements
{
public:
static void applyPixelColor(uint8_t* pPixels, uint16_t indexPixel, ColorObject color)
{
uint8_t* p = getPixelAddress(pPixels, indexPixel);
*p++ = color.R;
*p++ = color.B;
*p = color.G;
}
static ColorObject retrievePixelColor(uint8_t* pPixels, uint16_t indexPixel)
{
ColorObject color;
uint8_t* p = getPixelAddress(pPixels, indexPixel);
color.R = *p++;
color.B = *p++;
color.G = *p;
return color;
}
};