Mercurial > octave
diff libgui/graphics/Canvas.h @ 23535:2aab625b502c
Add getframe function for opengl based toolkits (bug #48195)
* graphics.in.h (graphics_toolkit::get_pixels,
base_graphics_toolkit::get_pixels): new virtual methods
* graphics.cc (F__get_frame__): new function.
* Backend.h/cc (Backend::get_pixels): implement new method
* ObjectProxy.h/cc (ObjectProxy::get_pixels): new method, invoke directly
Figure object slotGetPixels in Qt::BlockingQueuedConnection mode
* Figure.h/cc (Figure::slotGetPixels): new public slot
* Canvas.h (Canvas::getPixels, Canvas::do_getPixels): new methods
* GLCanvas.h/cc (GLCanvas::do_getPixels): reimplemented method, use
opengl_renderer to draw object and get_pixels
* __init_fltk__.cc (fltk_graphics_toolkit::get_pixels,
figure_manager::get_pixels, figure_manager::do_get_pixels,
plot_window::get_pixels, OpenGL_fltk::get_pixels): new methods
* gl-renderer.h/cc (opengl_renderer::get_pixels): new method, read pixels in
the current opengl scene
* getframe.m: new function file
* image.txi: add getframe doc
* NEWS: announce new function
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Tue, 23 May 2017 15:01:27 +0200 |
parents | c763214a8260 |
children | 194eb4bd202b |
line wrap: on
line diff
--- a/libgui/graphics/Canvas.h Sat May 27 09:59:32 2017 -0700 +++ b/libgui/graphics/Canvas.h Tue May 23 15:01:27 2017 +0200 @@ -71,12 +71,15 @@ virtual void toggleGrid (const graphics_handle& handle) = 0; virtual void autoAxes (const graphics_handle& handle) = 0; + virtual uint8NDArray getPixels (void) { return do_getPixels (m_handle); }; + protected: virtual void draw (const graphics_handle& handle) = 0; virtual void drawZoomBox (const QPoint& p1, const QPoint& p2) = 0; virtual void resize (int x, int y, int width, int height) = 0; virtual graphics_object selectFromAxes (const graphics_object& ax, const QPoint& pt) = 0; + virtual uint8NDArray do_getPixels (const graphics_handle& handle) = 0; protected: Canvas (const graphics_handle& handle)