MCPcopy Create free account
hub / github.com/BruceDevices/firmware / width

Method width

lib/TFT_eSPI/Extensions/Sprite.cpp:1554–1570  ·  view source on GitHub ↗

** Function name: width ** Description: Return the width of sprite ***************************************************************************************/ Return the size of the sprite

Source from the content-addressed store, hash-verified

1552***************************************************************************************/
1553// Return the size of the sprite
1554int16_t TFT_eSprite::width(void)
1555{
1556 if (!_created ) return 0;
1557
1558 if (_bpp > 1) {
1559 if (_vpDatum) return _xWidth;
1560 return _dwidth;
1561 }
1562
1563 if (rotation & 1) {
1564 if (_vpDatum) return _xWidth;
1565 return _dheight;
1566 }
1567
1568 if (_vpDatum) return _xWidth;
1569 return _dwidth;
1570}
1571
1572
1573/***************************************************************************************

Callers 1

getRotatedBoundsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected