summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2010-03-17 07:56:50 +0000
committerManolo Gouy <Manolo>2010-03-17 07:56:50 +0000
commit8e4d054650d879bdd7eb549a4ef4ebc9104e2677 (patch)
tree6e98f68222712d247d79258d9dc97751043379c7 /src
parent762d02fb6207c40e3c0e2ff8a9d41a510094f9c0 (diff)
Some fine tuning after introduction of Fl_Gl_Window-capable Fl_Printer::print_widget()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7281 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Device.cxx14
-rw-r--r--src/Fl_Gl_Printer.cxx4
2 files changed, 5 insertions, 13 deletions
diff --git a/src/Fl_Device.cxx b/src/Fl_Device.cxx
index 642ddd22b..4372d58db 100644
--- a/src/Fl_Device.cxx
+++ b/src/Fl_Device.cxx
@@ -45,13 +45,6 @@ void Fl_Virtual_Printer::print_widget(Fl_Widget* widget, int delta_x, int delta_
}
// if widget is a window, clip all drawings to the window area
if (is_window) fl_push_clip(0, 0, widget->w(), widget->h() );
-#ifdef __APPLE__
- CGContextRef save_gc = fl_gc;
-#elif defined(WIN32) // && !defined(__CYGWIN__)
- HDC save_gc = fl_gc;
-#else
- _XGC *save_gc = fl_gc; // FIXME
-#endif
// we do some trickery to recognize OpenGL windows and draw them via a plugin
int drawn_by_plugin = 0;
if (widget->as_gl_window()) {
@@ -59,10 +52,9 @@ void Fl_Virtual_Printer::print_widget(Fl_Widget* widget, int delta_x, int delta_
Fl_Device_Plugin *pi = (Fl_Device_Plugin*)pm.plugin("opengl.device.fltk.org");
if (pi) drawn_by_plugin = pi->print(this, widget, 0, 0);
}
- if (!drawn_by_plugin)
- widget->draw();
-
- fl_gc = save_gc;
+ if (!drawn_by_plugin) {
+ widget->draw();
+ }
if (is_window) fl_pop_clip();
// find subwindows of widget and print them
traverse(widget);
diff --git a/src/Fl_Gl_Printer.cxx b/src/Fl_Gl_Printer.cxx
index ac1892dde..46d8f011f 100644
--- a/src/Fl_Gl_Printer.cxx
+++ b/src/Fl_Gl_Printer.cxx
@@ -91,8 +91,8 @@ void Fl_Gl_Printer::print_gl_window(Fl_Gl_Window *glw, int x, int y)
}
/*
- This class will make sure that OpenGL printing is availbale if fltk_gl
- was linked to the programm.
+ This class will make sure that OpenGL printing is available if fltk_gl
+ was linked to the program.
*/
class Fl_Gl_Device_Plugin : public Fl_Device_Plugin {
public: