diff options
Diffstat (limited to 'src/pixeltypes.h')
-rw-r--r-- | src/pixeltypes.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/pixeltypes.h b/src/pixeltypes.h index 6e91723d..f28c2c67 100644 --- a/src/pixeltypes.h +++ b/src/pixeltypes.h @@ -353,6 +353,14 @@ struct CRGB { } /// return a CRGB object that is a scaled down version of this object + inline CRGB scale8 (uint8_t scaledown ) const + { + CRGB out = *this; + nscale8x3( out.r, out.g, out.b, scaledown); + return out; + } + + /// return a CRGB object that is a scaled down version of this object inline CRGB scale8 (const CRGB & scaledown ) const { CRGB out; @@ -412,7 +420,7 @@ struct CRGB { } /// invert each channel - inline CRGB operator- () + inline CRGB operator- () const { CRGB retval; retval.r = 255 - r; |