Basically i glued Peter Drescher and Simon Ford libs in a GraphicsDisplay class, then derived TFT or LCD class (which inherits Protocols class), then the most derived ones (Inits), which are per-display and are the only part needed to be adapted to diff hw.

Fork of UniGraphic by GraphicsDisplay

Revision:
20:14daa48ffd4c
Parent:
15:b9483ba842c8
Child:
21:ae0a4eedfc90
--- a/Display/LCD.h	Mon Mar 02 10:52:26 2015 +0000
+++ b/Display/LCD.h	Mon Mar 23 14:08:04 2015 +0000
@@ -68,7 +68,12 @@
     */
     virtual void window(int x, int y, int w, int h);
     
-    
+    /** Read pixel color at location
+    * @param x is the horizontal offset to this pixel.
+    * @param y is the vertical offset to this pixel.
+    * @returns 16bit color, 0000=Black(pixel set), FFFF=White(pixel clear).
+    */
+    virtual unsigned short pixelread(int x, int y);
 
     /** Push a single pixel into the window and increment position.
     * You must first call window() then push pixels in loop.
@@ -139,15 +144,15 @@
     */
     int sizeX();
 
-    /** get display X size in pixels (native, orientation independent)
-    * @returns screen height in pixels.
+    /** get display Y size in pixels (native, orientation independent)
+    * @returns Y size in pixels
     */
     int sizeY();
     
 ////////////////////////////////////////////////////////////////////////////////    
     // not implemented yet
 //////////////////////////////////////////////////////////////////
-    virtual unsigned short pixelread(int x, int y){return 0;};
+  //  virtual unsigned short pixelread(int x, int y){return 0;};
     virtual void window4read(int x, int y, int w, int h){};
     void setscrollarea (int startY, int areasize){};
     void scroll (int lines){};