summaryrefslogtreecommitdiff
path: root/src/drivers/Pico
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2016-03-13 22:16:37 +0000
committerMatthias Melcher <fltk@matthiasm.com>2016-03-13 22:16:37 +0000
commitb496d18b85917106c48e8e6f74115b3122b603d1 (patch)
tree4d96befa4377a81c89c6a32f4d66220199572938 /src/drivers/Pico
parent30756ae3500a62bd8f63b4df3eb3ca8f6b8b0b70 (diff)
Fixed 'flush()' code for single, double, and overlay buffering
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11359 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Pico')
-rw-r--r--src/drivers/Pico/Fl_Pico_Graphics_Driver.cxx26
-rw-r--r--src/drivers/Pico/Fl_Pico_Window_Driver.H7
-rw-r--r--src/drivers/Pico/Fl_Pico_Window_Driver.cxx45
3 files changed, 62 insertions, 16 deletions
diff --git a/src/drivers/Pico/Fl_Pico_Graphics_Driver.cxx b/src/drivers/Pico/Fl_Pico_Graphics_Driver.cxx
index 914fdafd3..3968ea756 100644
--- a/src/drivers/Pico/Fl_Pico_Graphics_Driver.cxx
+++ b/src/drivers/Pico/Fl_Pico_Graphics_Driver.cxx
@@ -35,10 +35,10 @@ void Fl_Pico_Graphics_Driver::point(int x, int y)
void Fl_Pico_Graphics_Driver::rect(int x, int y, int w, int h)
{
- line(x, y, x+w, y);
- line(x+w, y, x+w, y+h);
- line(x+w, y+h, x, y+h);
- line(x, y+h, x, y);
+ line(x, y, x+w-1, y);
+ line(x+w-1, y, x+w-1, y+h-1);
+ line(x+w-1, y+h-1, x, y+h-1);
+ line(x, y+h-1, x, y);
}
void Fl_Pico_Graphics_Driver::rectf(int x, int y, int w, int h)
@@ -231,10 +231,20 @@ static const char *font_data[128] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* */0, /*!*/"\31\34\100\35\36", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-
- 0, 0, /*B*/"\43\54\45\15\11\41\52\43\13", 0, 0, /*E*/"\51\11\15\55\100\13\43", 0, 0,
- /*H*/"\11\15\100\61\65\100\13\63", 0, 0, 0, 0, 0, 0, 0,
+ /*0*/"\62\51\21\12\14\25\55\64\62\100\52\61",
+ /*1*/"\22\31\35\100\25\45",
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+
+ 0,
+ /*A*/"\15\31\55\100\23\43",
+ /*B*/"\43\54\45\15\11\41\52\43\13",
+ /*C*/"\62\51\21\12\14\25\55\64",
+ /*D*/"\11\51\62\64\55\15\11",
+ /*E*/"\61\11\15\65\100\13\43",
+ /*F*/"\61\11\15\100\13\43",
+ /*G*/"\62\51\21\12\14\25\55\64\100\65\63\33",
+ /*H*/"\11\15\100\61\65\100\13\63",
+ /*I*/"\21\41\100\31\35\100\25\45", 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, /*T*/"\11\71\100\41\45", 0, 0, /*W*/"\01\15\33\55\61",
/*X*/"\15\51\100\11\55", 0, 0, 0, 0, 0, 0, 0,
diff --git a/src/drivers/Pico/Fl_Pico_Window_Driver.H b/src/drivers/Pico/Fl_Pico_Window_Driver.H
index 51e9db920..40d6457fa 100644
--- a/src/drivers/Pico/Fl_Pico_Window_Driver.H
+++ b/src/drivers/Pico/Fl_Pico_Window_Driver.H
@@ -37,6 +37,13 @@ public:
// --- window data
virtual int decorated_w();
virtual int decorated_h();
+
+ // --- window management
+ virtual void flush_single();
+ virtual void flush_double();
+ virtual void flush_overlay();
+ virtual void draw_begin();
+ virtual void draw_end();
};
diff --git a/src/drivers/Pico/Fl_Pico_Window_Driver.cxx b/src/drivers/Pico/Fl_Pico_Window_Driver.cxx
index b14696d6f..bb5b4e612 100644
--- a/src/drivers/Pico/Fl_Pico_Window_Driver.cxx
+++ b/src/drivers/Pico/Fl_Pico_Window_Driver.cxx
@@ -25,14 +25,6 @@
-// TODO: move this to Fl_Window_Driver
-void Fl_X::flush()
-{
- w->driver()->flush();
-}
-
-
-
Fl_Pico_Window_Driver::Fl_Pico_Window_Driver(Fl_Window *win)
: Fl_Window_Driver(win)
{
@@ -58,6 +50,43 @@ int Fl_Pico_Window_Driver::decorated_h()
}
+// --- window management
+void Fl_Pico_Window_Driver::flush_single()
+{
+ Fl_X *i = Fl_X::i(pWindow);
+ if (!i) return;
+ fl_clip_region(i->region);
+ i->region = 0;
+ pWindow->draw();
+}
+
+
+void Fl_Pico_Window_Driver::flush_double()
+{
+ flush_single();
+}
+
+
+void Fl_Pico_Window_Driver::flush_overlay()
+{
+ flush_single();
+}
+
+
+
+
+void Fl_Pico_Window_Driver::draw_begin()
+{
+ // nothing to do
+}
+
+
+void Fl_Pico_Window_Driver::draw_end()
+{
+ // nothing to do
+}
+
+
//
// End of "$Id: Fl_Pico_Window_Driver.cxx 11253 2016-03-01 00:54:21Z matt $".
// \ No newline at end of file