mirror of
https://github.com/adafruit/Adafruit-GFX-Library.git
synced 2026-10-27 06:21:36 +00:00
add getters for text size , color and font
This commit is contained in:
1 parent
55a94acea3
commit
32638aa9ce
1 file changed
+41
@@ -135,6 +135,30 @@ public:
|
||||
void setTextSize(uint8_t sx, uint8_t sy);
|
||||
void setFont(const GFXfont *f = NULL);
|
||||
|
||||
/**********************************************************************/
|
||||
/*!
|
||||
@brief Get GFX font
|
||||
@returns GFX font
|
||||
*/
|
||||
/**********************************************************************/
|
||||
GFXfont* getFont() { return gfxFont; }
|
||||
|
||||
/**********************************************************************/
|
||||
/*!
|
||||
@brief Get text size multiplier x
|
||||
@returns text size multiplier x
|
||||
*/
|
||||
/**********************************************************************/
|
||||
uint8_t getTextSizeX() { return textsize_x; }
|
||||
|
||||
/**********************************************************************/
|
||||
/*!
|
||||
@brief Get text size multiplier y
|
||||
@returns text size multiplier y
|
||||
*/
|
||||
/**********************************************************************/
|
||||
uint8_t getTextSizeY() { return textsize_y; }
|
||||
|
||||
/**********************************************************************/
|
||||
/*!
|
||||
@brief Set text cursor location
|
||||
@@ -169,6 +193,23 @@ public:
|
||||
textbgcolor = bg;
|
||||
}
|
||||
|
||||
/**********************************************************************/
|
||||
/*!
|
||||
@brief Get text color
|
||||
@returns text color
|
||||
*/
|
||||
/**********************************************************************/
|
||||
uint16_t getTextColor() { return textcolor; }
|
||||
|
||||
/**********************************************************************/
|
||||
/*!
|
||||
@brief Get text background color
|
||||
@returns text background color
|
||||
*/
|
||||
/**********************************************************************/
|
||||
uint16_t getTextBgColor() { return textbgcolor; }
|
||||
|
||||
|
||||
/**********************************************************************/
|
||||
/*!
|
||||
@brief Set whether text that is too long for the screen width should
|
||||
|
||||
Reference in new issue
Block a user