diff options
author | Stanley Huang <stanleyhuangyc@gmail.com> | 2014-03-09 12:26:22 +0800 |
---|---|---|
committer | Stanley Huang <stanleyhuangyc@gmail.com> | 2014-03-09 12:26:22 +0800 |
commit | c2aa5159fac7169cf3b6067f15ed8e1cb2c56288 (patch) | |
tree | da26a601cd7478b9e940a794b79e631cc47ac9d2 /libraries/MultiLCD/ILI9325D.cpp | |
parent | 6867572dbde6587dd30c11cd9bf9a8de0bd1b4c7 (diff) | |
download | 2021-arduino-obd-c2aa5159fac7169cf3b6067f15ed8e1cb2c56288.tar.gz 2021-arduino-obd-c2aa5159fac7169cf3b6067f15ed8e1cb2c56288.tar.bz2 2021-arduino-obd-c2aa5159fac7169cf3b6067f15ed8e1cb2c56288.zip |
Update MultiLCD library
Diffstat (limited to 'libraries/MultiLCD/ILI9325D.cpp')
-rw-r--r-- | libraries/MultiLCD/ILI9325D.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libraries/MultiLCD/ILI9325D.cpp b/libraries/MultiLCD/ILI9325D.cpp index f977d94..ee774d4 100644 --- a/libraries/MultiLCD/ILI9325D.cpp +++ b/libraries/MultiLCD/ILI9325D.cpp @@ -412,10 +412,10 @@ void LCD_ILI9325D::writeDigit(byte n) } } -void LCD_ILI9325D::draw(const PROGMEM byte* buffer, uint16_t x, uint16_t y, uint16_t width, uint16_t height) +void LCD_ILI9325D::draw(const PROGMEM byte* buffer, uint16_t width, uint16_t height) { byte rows = height >> 3; - setXY(y, y + height - 1, x, x + width - 1); + setXY(m_y, m_y + height - 1, m_x, m_x + width - 1); uint16_t i = width - 1; do { for (uint8_t h = 0; h < rows; h++) { @@ -425,13 +425,14 @@ void LCD_ILI9325D::draw(const PROGMEM byte* buffer, uint16_t x, uint16_t y, uint } } } while (i--); + m_x += width; } -void LCD_ILI9325D::draw2x(const PROGMEM byte* buffer, uint16_t x, uint16_t y, byte width, byte height) +void LCD_ILI9325D::draw2x(const PROGMEM byte* buffer, byte width, byte height) { char buf[240]; uint16_t pixels = (uint16_t)width * height; - setXY(y, y + height * 2 - 1, x, x + width * 2- 1); + setXY(m_y, m_y + height * 2 - 1, m_x, m_x + width * 2- 1); uint16_t i = width - 1; do { memcpy_P(buf, buffer + (uint16_t)i * height * 2, height * 2); @@ -444,6 +445,7 @@ void LCD_ILI9325D::draw2x(const PROGMEM byte* buffer, uint16_t x, uint16_t y, by WriteData(buf[j], buf[j + 1]); } } while (i--); + m_x += width * 2; } void LCD_ILI9325D::draw4bpp(const PROGMEM byte* buffer, uint16_t x, uint16_t y, uint16_t width, uint16_t height) |