diff --git a/TFT_eSPI.cpp b/TFT_eSPI.cpp index d537faeb..f1487b12 100644 --- a/TFT_eSPI.cpp +++ b/TFT_eSPI.cpp @@ -2983,6 +2983,26 @@ void TFT_eSPI::setTextWrap(bool wrapX, bool wrapY) textwrapY = wrapY; } +/*************************************************************************************** +** Function name: getTextWrapX +** Description: Returns current text wrap width setting +***************************************************************************************/ +bool TFT_eSPI::getTextWrapX() { + return textwrapX; +} +bool TFT_eSPI::getTextWrap() { + return textwrapX; +} + + +/*************************************************************************************** +** Function name: getTextWrapY +** Description: Returns current text wrap height setting +***************************************************************************************/ +bool TFT_eSPI::getTextWrapY() { + return textwrapY; +} + /*************************************************************************************** ** Function name: setTextDatum diff --git a/TFT_eSPI.h b/TFT_eSPI.h index 8ae23427..f97f4b9d 100644 --- a/TFT_eSPI.h +++ b/TFT_eSPI.h @@ -662,6 +662,10 @@ class TFT_eSPI : public Print { friend class TFT_eSprite; // Sprite class has ac setTextSize(uint8_t size); // Set character size multiplier (this increases pixel size) void setTextWrap(bool wrapX, bool wrapY = false); // Turn on/off wrapping of text in TFT width and/or height + bool getTextWrapX(); // get current textwrap setting for width + bool getTextWrap(); // get current textwrap setting for width (to match some other graphics libraries) + bool getTextWrapY(); // get current textwrap setting for height + void setTextDatum(uint8_t datum); // Set text datum position (default is top left), see Section 5 above uint8_t getTextDatum(void);