.pio/libdeps/m5stack-core2/M5Core2/src/utility/Sprite.cpp
void TFT_eSprite::writeColor(uint16_t color)
{
  if (!_created ) return;

  // Write 16 bit RGB 565 encoded colour to RAM
  if (_bpp == 16) _img [_xptr + _yptr * _iwidth] = color;

  // Write 8 bit RGB 332 encoded colour to RAM
  else if (_bpp == 8) _img8[_xptr + _yptr * _iwidth] = (uint8_t) color;

  else drawPixel(_xptr, _yptr, color);

  // Increment x
  _xptr++;

  // Wrap on x and y to start, increment y if needed
  if (_xptr > _xe)
  {
    _xptr = _xs;
    _yptr++;
    if (_yptr > _ye) _yptr = _ys;
  }
}
/***************************************************************************************
** Function name:           writeColor
** Description:             Write a pixel with pre-formatted colour to the set window
*************************************************************************************x*/
Function name:           writeColor
Description:             Write a pixel with pre-formatted colour to the set window
x
Function name : writeColor Description : Write a pixel with pre - formatted colour to the set window x
void TFT_eSprite::writeColor(uint16_t color)
{
  if (!_created ) return;
  if (_bpp == 16) _img [_xptr + _yptr * _iwidth] = color;
  else if (_bpp == 8) _img8[_xptr + _yptr * _iwidth] = (uint8_t) color;
  else drawPixel(_xptr, _yptr, color);
  _xptr++;
  if (_xptr > _xe)
  {
    _xptr = _xs;
    _yptr++;
    if (_yptr > _ye) _yptr = _ys;
  }
}
void TFT_eSprite :: writeColor ( uint16_t color ) { if ( ! _created ) return ; if ( _bpp == 16 ) _img [ _xptr + _yptr * _iwidth ] = color ; else if ( _bpp == 8 ) _img8 [ _xptr + _yptr * _iwidth ] = ( uint8_t ) color ; else drawPixel ( _xptr , _yptr , color ) ; _xptr ++ ; if ( _xptr > _xe ) { _xptr = _xs ; _yptr ++ ; if ( _yptr > _ye ) _yptr = _ys ; } }
Function name:           writeColor
Description:             Write a pixel with pre-formatted colour to the set window
x
Function name : writeColor Description : Write a pixel with pre - formatted colour to the set window x
// Write 16 bit RGB 565 encoded colour to RAM // Write 8 bit RGB 332 encoded colour to RAM // Increment x // Wrap on x and y to start, increment y if needed