diff libgui/graphics/GLCanvas.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 59cdf06c940e
line wrap: on
line diff
--- a/libgui/graphics/GLCanvas.h	Sat May 27 09:59:32 2017 -0700
+++ b/libgui/graphics/GLCanvas.h	Tue May 23 15:01:27 2017 +0200
@@ -37,6 +37,7 @@
     ~GLCanvas (void);
 
     void draw (const graphics_handle& handle);
+    uint8NDArray  do_getPixels (const graphics_handle& handle);
     void toggleAxes (const graphics_handle& handle);
     void toggleGrid (const graphics_handle& handle);
     void autoAxes (const graphics_handle& handle);