|
Window object to render af::arrays. More...
#include <graphics.h>
Public Member Functions | |
Window () | |
Creates a window object with default width and height with title set to "ArrayFire". More... | |
Window (const char *const title) | |
Creates a window object with default width and height using the title provided by the user. More... | |
Window (const int width, const int height, const char *const title="ArrayFire") | |
Creates a window object using the parameters provided by the user. More... | |
Window (const af_window wnd) | |
Creates a window object with default width and height with title set to "ArrayFire". More... | |
~Window () | |
Destroys the window handle. More... | |
af_window | get () const |
void | setPos (const unsigned x, const unsigned y) |
Set the start position where the window will appear. More... | |
void | setTitle (const char *const title) |
Set the window title. More... | |
void | setSize (const unsigned w, const unsigned h) |
Set the window size. More... | |
void | setColorMap (const ColorMap cmap) |
Set the colormap to be used for subsequent rendering calls. More... | |
void | image (const array &in, const char *title=NULL) |
Renders the input array as an image to the window. More... | |
void | plot3 (const array &in, const char *title=NULL) |
Renders the input array as an 3d line plot to the window. More... | |
void | plot (const array &X, const array &Y, const char *const title=NULL) |
Renders the input arrays as a 2D plot to the window. More... | |
void | scatter (const array &X, const array &Y, const af::markerType marker=AF_MARKER_POINT, const char *const title=NULL) |
Renders the input arrays as a 2D scatter-plot to the window. More... | |
void | scatter3 (const array &P, const af::markerType marker=AF_MARKER_POINT, const char *const title=NULL) |
Renders the input arrays as a 3D scatter-plot to the window. More... | |
void | hist (const array &X, const double minval, const double maxval, const char *const title=NULL) |
Renders the input array as a histogram to the window. More... | |
void | surface (const array &S, const char *const title=NULL) |
Renders the input arrays as a 3D surface plot to the window. More... | |
void | surface (const array &xVals, const array &yVals, const array &S, const char *const title=NULL) |
Renders the input arrays as a 3D surface plot to the window. More... | |
void | grid (const int rows, const int cols) |
Setup grid layout for multiview mode in a window. More... | |
void | show () |
This function swaps the background buffer to current view and polls for any key strokes while the window was in focus. More... | |
bool | close () |
Check if window is marked for close. More... | |
void | setVisibility (const bool isVisible) |
Hide/Show the window. More... | |
Window & | operator() (const int r, const int c) |
This function is used to keep track of which cell in the grid mode is being currently rendered. More... | |
Window object to render af::arrays.
Windows are not CopyConstructible or CopyAssignable.
|
inline |
This function is used to keep track of which cell in the grid mode is being currently rendered.
When a user does Window(0,0), we internally store the cell coordinates and return a reference to the very object that called upon this function. This reference can be used later to issue draw calls using rendering functions.