Deleted class Fl_Gl_Printer that's no longer useful.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7284 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
e6a5d896e6
commit
53070ba725
@ -203,7 +203,7 @@ public:
|
||||
};
|
||||
#endif
|
||||
|
||||
/*
|
||||
/**
|
||||
This plugin socket allows the integration of new device drivers for special
|
||||
window or screen types. It is currently used to provide an automated printing
|
||||
service for OpenGL windows, if linked with fltk_gl.
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <FL/Fl_Printer.H>
|
||||
#include <FL/Fl_Gl_Window.H>
|
||||
|
||||
/**
|
||||
/*
|
||||
* @brief To print Fl_Gl_Window's.
|
||||
*
|
||||
Because Fl_Printer::print_widget() prints only the background of Fl_Gl_Window's,
|
||||
@ -14,12 +14,12 @@
|
||||
*/
|
||||
class Fl_Gl_Printer : public Fl_Printer {
|
||||
public:
|
||||
/**
|
||||
/*
|
||||
@brief The constructor.
|
||||
*/
|
||||
Fl_Gl_Printer(void) : Fl_Printer() {}
|
||||
|
||||
/**
|
||||
/*
|
||||
@brief Prints an Fl_Gl_Window.
|
||||
*
|
||||
Under MSWindows, take care to move the print dialog window(s) out of the target OpenGL window(s)
|
||||
|
@ -1,8 +1,9 @@
|
||||
/*
|
||||
* Fl_Gl_Printer.cxx
|
||||
* Fl_Gl_Device_Plugin.cxx
|
||||
*/
|
||||
|
||||
#include "FL/Fl_Gl_Printer.H"
|
||||
#include <FL/Fl_Printer.H>
|
||||
#include <FL/Fl_Gl_Window.H>
|
||||
#include "Fl_Gl_Choice.H"
|
||||
#include "FL/Fl.H"
|
||||
#ifndef __APPLE__
|
||||
@ -16,7 +17,7 @@ static void imgProviderReleaseData (void *info, const void *data, size_t size)
|
||||
}
|
||||
#endif
|
||||
|
||||
void Fl_Gl_Printer::print_gl_window(Fl_Gl_Window *glw, int x, int y)
|
||||
static void print_gl_window(Fl_Virtual_Printer *printer, Fl_Gl_Window *glw, int x, int y)
|
||||
{
|
||||
#ifdef WIN32
|
||||
HDC save_gc = fl_gc;
|
||||
@ -73,7 +74,7 @@ void Fl_Gl_Printer::print_gl_window(Fl_Gl_Window *glw, int x, int y)
|
||||
if(image == NULL) return;
|
||||
CGContextSaveGState(fl_gc);
|
||||
int w, h;
|
||||
this->printable_rect(&w, &h);
|
||||
printer->printable_rect(&w, &h);
|
||||
CGContextTranslateCTM(fl_gc, 0, h);
|
||||
CGContextScaleCTM(fl_gc, 1.0f, -1.0f);
|
||||
CGRect rect = { { x, h - y - glw->h() }, { glw->w(), glw->h() } };
|
||||
@ -90,7 +91,7 @@ void Fl_Gl_Printer::print_gl_window(Fl_Gl_Window *glw, int x, int y)
|
||||
#endif // __APPLE__
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
This class will make sure that OpenGL printing is available if fltk_gl
|
||||
was linked to the program.
|
||||
*/
|
||||
@ -101,10 +102,7 @@ public:
|
||||
virtual int print(Fl_Virtual_Printer *p, Fl_Widget *w, int x, int y) {
|
||||
Fl_Gl_Window *glw = w->as_gl_window();
|
||||
if (!glw) return 0;
|
||||
// FIXME: this is a dangerous cast! Remove Fl_Gl_Printer entirely and add
|
||||
// FIXME: a static function (may be a friend of Fl_Printer).
|
||||
Fl_Gl_Printer *glp = (Fl_Gl_Printer*)p;
|
||||
glp->print_gl_window(glw, x, y);
|
||||
print_gl_window(p, glw, x, y);
|
||||
return 1;
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user