From c2aa5159fac7169cf3b6067f15ed8e1cb2c56288 Mon Sep 17 00:00:00 2001 From: Stanley Huang Date: Sun, 9 Mar 2014 12:26:22 +0800 Subject: Update MultiLCD library --- libraries/MultiLCD/ILI9325D.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libraries/MultiLCD/ILI9325D.cpp') 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) -- cgit v1.2.3