Mercurial > octave
comparison 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 |
comparison
equal
deleted
inserted
replaced
23534:b6498c088fca | 23535:2aab625b502c |
---|---|
69 | 69 |
70 virtual void toggleAxes (const graphics_handle& handle) = 0; | 70 virtual void toggleAxes (const graphics_handle& handle) = 0; |
71 virtual void toggleGrid (const graphics_handle& handle) = 0; | 71 virtual void toggleGrid (const graphics_handle& handle) = 0; |
72 virtual void autoAxes (const graphics_handle& handle) = 0; | 72 virtual void autoAxes (const graphics_handle& handle) = 0; |
73 | 73 |
74 virtual uint8NDArray getPixels (void) { return do_getPixels (m_handle); }; | |
75 | |
74 protected: | 76 protected: |
75 virtual void draw (const graphics_handle& handle) = 0; | 77 virtual void draw (const graphics_handle& handle) = 0; |
76 virtual void drawZoomBox (const QPoint& p1, const QPoint& p2) = 0; | 78 virtual void drawZoomBox (const QPoint& p1, const QPoint& p2) = 0; |
77 virtual void resize (int x, int y, int width, int height) = 0; | 79 virtual void resize (int x, int y, int width, int height) = 0; |
78 virtual graphics_object selectFromAxes (const graphics_object& ax, | 80 virtual graphics_object selectFromAxes (const graphics_object& ax, |
79 const QPoint& pt) = 0; | 81 const QPoint& pt) = 0; |
82 virtual uint8NDArray do_getPixels (const graphics_handle& handle) = 0; | |
80 | 83 |
81 protected: | 84 protected: |
82 Canvas (const graphics_handle& handle) | 85 Canvas (const graphics_handle& handle) |
83 : m_handle (handle), | 86 : m_handle (handle), |
84 m_redrawBlocked (false), | 87 m_redrawBlocked (false), |