.pio/libdeps/m5stack-core2/M5Core2/src/utility/Sprite.cpp
void TFT_eSprite::drawFastHLine(int32_t x, int32_t y, int32_t w, uint32_t color)
{

  if ((y < 0) || (x >= _iwidth) || (y >= _iheight) || !_created) return;

  if (x < 0) { w += x; x = 0; }

  if ((x + w) > _iwidth)  w = _iwidth  - x;

  if (w < 1) return;

  if (_bpp == 16)
  {
    color = (color >> 8) | (color << 8);
    while (w--) _img[_iwidth * y + x++] = (uint16_t) color;
  }
  else if (_bpp == 8)
  {
    color = (color & 0xE000)>>8 | (color & 0x0700)>>6 | (color & 0x0018)>>3;
    memset(_img8+_iwidth * y + x, (uint8_t)color, w);
  }
  else
  {
    while (w--)
    {
      drawPixel(x, y, color);
      x++;
    }
  }
}
/***************************************************************************************
** Function name:           drawFastHLine
** Description:             draw a horizontal line
*************************************************************************************x*/
Function name:           drawFastHLine
Description:             draw a horizontal line
x
Function name : drawFastHLine Description : draw a horizontal line x
void TFT_eSprite::drawFastHLine(int32_t x, int32_t y, int32_t w, uint32_t color)
{
  if ((y < 0) || (x >= _iwidth) || (y >= _iheight) || !_created) return;
  if (x < 0) { w += x; x = 0; }
  if ((x + w) > _iwidth)  w = _iwidth  - x;
  if (w < 1) return;
  if (_bpp == 16)
  {
    color = (color >> 8) | (color << 8);
    while (w--) _img[_iwidth * y + x++] = (uint16_t) color;
  }
  else if (_bpp == 8)
  {
    color = (color & 0xE000)>>8 | (color & 0x0700)>>6 | (color & 0x0018)>>3;
    memset(_img8+_iwidth * y + x, (uint8_t)color, w);
  }
  else
  {
    while (w--)
    {
      drawPixel(x, y, color);
      x++;
    }
  }
}
void TFT_eSprite :: drawFastHLine ( int32_t x , int32_t y , int32_t w , uint32_t color ) { if ( ( y < 0 ) || ( x >= _iwidth ) || ( y >= _iheight ) || ! _created ) return ; if ( x < 0 ) { w += x ; x = 0 ; } if ( ( x + w ) > _iwidth ) w = _iwidth - x ; if ( w < 1 ) return ; if ( _bpp == 16 ) { color = ( color >> 8 ) | ( color << 8 ) ; while ( w -- ) _img [ _iwidth * y + x ++ ] = ( uint16_t ) color ; } else if ( _bpp == 8 ) { color = ( color & 0xE000 ) >> 8 | ( color & 0x0700 ) >> 6 | ( color & 0x0018 ) >> 3 ; memset ( _img8 + _iwidth * y + x , ( uint8_t ) color , w ) ; } else { while ( w -- ) { drawPixel ( x , y , color ) ; x ++ ; } } }
Function name:           drawFastHLine
Description:             draw a horizontal line
x
Function name : drawFastHLine Description : draw a horizontal line x