Fork of David Smart's RA8875 library
Fork of RA8875 by
Revision 33:b6b710758ab3, committed 2014-01-22
- Comitter:
- WiredHome
- Date:
- Wed Jan 22 03:50:55 2014 +0000
- Parent:
- 32:0e4f2ae512e2
- Child:
- 34:c99ec28fac66
- Commit message:
- Documentation fixes after running doxygen externally.
; And migrated colour to color.
Changed in this revision
--- a/GraphicsDisplay.cpp Tue Jan 21 03:28:36 2014 +0000 +++ b/GraphicsDisplay.cpp Wed Jan 22 03:50:55 2014 +0000 @@ -211,10 +211,10 @@ window(0,0, width(),height()); } -RetCode_t GraphicsDisplay::putp(color_t colour) +RetCode_t GraphicsDisplay::putp(color_t color) { // put pixel at current pixel location - pixel(_x, _y, colour); + pixel(_x, _y, color); // update pixel location based on window settings _x++; if(_x > _x2) { @@ -227,14 +227,14 @@ return noerror; } -void GraphicsDisplay::fill(int x, int y, int w, int h, color_t colour) +void GraphicsDisplay::fill(int x, int y, int w, int h, color_t color) { #ifdef USE_HW - fillrect(x,y, x+w, y+h, colour); + fillrect(x,y, x+w, y+h, color); #else window(x, y, w, h); for(int i=0; i<w*h; i++) { - putp(colour); + putp(color); } #endif } @@ -245,25 +245,25 @@ return noerror; } -void GraphicsDisplay::blit(int x, int y, int w, int h, const int * colour) +void GraphicsDisplay::blit(int x, int y, int w, int h, const int * color) { window(x, y, w, h); for (int i=0; i<w*h; i++) { - putp(colour[i]); + putp(color[i]); } } -int GraphicsDisplay::blitbit(int x, int y, int w, int h, const char * colour) +int GraphicsDisplay::blitbit(int x, int y, int w, int h, const char * color) { _foreground = 0xFFFF; - INFO("blitbit(%d,%d, %d,%d, %02X) [%04X,%04X]", x,y, w,h, *colour, _foreground, _background); + INFO("blitbit(%d,%d, %d,%d, %02X) [%04X,%04X]", x,y, w,h, *color, _foreground, _background); INFO("%lu %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X", - colour, - colour[0], colour[1], colour[2], colour[3], colour[4], colour[5], colour[6], colour[7], - colour[8], colour[9], colour[10], colour[11], colour[12], colour[13], colour[14], colour[15]); + color, + color[0], color[1], color[2], color[3], color[4], color[5], color[6], color[7], + color[8], color[9], color[10], color[11], color[12], color[13], color[14], color[15]); window(x, y, w, h); for (int i = 0; i < w*h; i++) { - char byte = colour[i >> 3]; + char byte = color[i >> 3]; int offset = i & 0x7; if (offset == 0) INFO(" %2d = %02X", i>>3, byte);
--- a/GraphicsDisplay.h Tue Jan 21 03:28:36 2014 +0000 +++ b/GraphicsDisplay.h Wed Jan 22 03:50:55 2014 +0000 @@ -39,7 +39,7 @@ /// @param color defines the color for the pixel. /// @returns success/failure code. @see RetCode_t. /// - virtual RetCode_t pixel(unsigned int x, unsigned int y, color_t colour) = 0; + virtual RetCode_t pixel(unsigned int x, unsigned int y, color_t color) = 0; /// get the screen width in pixels /// @@ -98,11 +98,11 @@ /// /// @param x is the left edge in pixels. /// @param y is the top edge in pixels. - /// @param width is the window width in pixels. - /// @param height is the window height in pixels. + /// @param w is the window width in pixels. + /// @param h is the window height in pixels. /// @returns success/failure code. @see RetCode_t. /// - virtual RetCode_t window(unsigned int x,unsigned int y,unsigned int w,unsigned int h); + virtual RetCode_t window(unsigned int x, unsigned int y, unsigned int w, unsigned int h); /// Clear the screen. /// @@ -127,10 +127,10 @@ virtual RetCode_t putp(color_t pixel); - virtual void fill(int x, int y, int w, int h, color_t colour); - virtual void blit(int x, int y, int w, int h, const int * colour); + virtual void fill(int x, int y, int w, int h, color_t color); + virtual void blit(int x, int y, int w, int h, const int * color); - virtual int blitbit(int x, int y, int w, int h, const char * colour); + virtual int blitbit(int x, int y, int w, int h, const char * color); /// This method transfers one character from the external font data /// to the screen. @@ -262,3 +262,4 @@ }; #endif +
--- a/RA8875.h Tue Jan 21 03:28:36 2014 +0000 +++ b/RA8875.h Wed Jan 22 03:50:55 2014 +0000 @@ -140,7 +140,7 @@ /// This is a high level command, and may invoke several primitives. /// /// @param command is the command to write. - /// @data is optional data to be written to the command register + /// @param data is optional data to be written to the command register /// and only occurs if the data is in the range [0 - 0xFF]. /// @returns success/failure code. @see RetCode_t. /// @@ -692,7 +692,7 @@ /// @param fillit defines whether the circle is filled or not. /// @returns success/failure code. @see RetCode_t. /// - RetCode_t ellipse(unsigned int x, unsigned int y, unsigned int radius1, unsigned int radius1, + RetCode_t ellipse(unsigned int x, unsigned int y, unsigned int radius1, unsigned int radius2, color_t color, fill_t fillit = NOFILL); /// Draw a filled Ellipse using the specified color @@ -708,7 +708,7 @@ /// @param fillit defines whether the circle is filled or not. /// @returns success/failure code. @see RetCode_t. /// - RetCode_t fillellipse(unsigned int x, unsigned int y, unsigned int radius1, unsigned int radius1, + RetCode_t fillellipse(unsigned int x, unsigned int y, unsigned int radius1, unsigned int radius2, color_t color, fill_t fillit = FILL); /// Draw an Ellipse @@ -722,7 +722,7 @@ /// @param fillit defines whether the circle is filled or not. /// @returns success/failure code. @see RetCode_t. /// - RetCode_t ellipse(unsigned int x, unsigned int y, unsigned int radius1, unsigned int radius1, fill_t fillit = NOFILL); + RetCode_t ellipse(unsigned int x, unsigned int y, unsigned int radius1, unsigned int radius2, fill_t fillit = NOFILL); /// Control display power ///
--- a/TextDisplay.cpp Tue Jan 21 03:28:36 2014 +0000 +++ b/TextDisplay.cpp Wed Jan 22 03:50:55 2014 +0000 @@ -78,17 +78,17 @@ return -1; } -RetCode_t TextDisplay::foreground(uint16_t colour) +RetCode_t TextDisplay::foreground(uint16_t color) { - INFO("foreground(%4X)", colour); - _foreground = colour; + INFO("foreground(%4X)", color); + _foreground = color; return noerror; } -RetCode_t TextDisplay::background(uint16_t colour) +RetCode_t TextDisplay::background(uint16_t color) { - INFO("background(%4X)", colour); - _background = colour; + INFO("background(%4X)", color); + _background = color; return noerror; } @@ -105,3 +105,4 @@ setvbuf(stdout, NULL, _IOLBF, columns()); return true; } +
--- a/TextDisplay.h Tue Jan 21 03:28:36 2014 +0000 +++ b/TextDisplay.h Wed Jan 22 03:50:55 2014 +0000 @@ -61,8 +61,8 @@ */ virtual RetCode_t cls() = 0; virtual RetCode_t locate(unsigned int column, unsigned int row) = 0; - virtual RetCode_t foreground(uint16_t colour) = 0; - virtual RetCode_t background(uint16_t colour) = 0; + virtual RetCode_t foreground(uint16_t color) = 0; + virtual RetCode_t background(uint16_t color) = 0; // putc (from Stream) // printf (from Stream) @@ -74,7 +74,7 @@ uint16_t _column; uint16_t _row; - // colours + // colors uint16_t _foreground; uint16_t _background; char *_path;