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". | |
Window (const char *const title) | |
Creates a window object with default width and height using the title provided by the user. | |
Window (const int width, const int height, const char *const title="ArrayFire") | |
Creates a window object using the parameters provided by the user. | |
Window (const af_window window) | |
Creates a window object with default width and height with title set to "ArrayFire". | |
~Window () | |
Destroys the window handle. | |
af_window | get () const |
void | setPos (const unsigned x, const unsigned y) |
Set the start position where the window will appear. | |
void | setTitle (const char *const title) |
Set the window title. | |
void | setSize (const unsigned w, const unsigned h) |
Set the window size. | |
void | setColorMap (const ColorMap cmap) |
Set the colormap to be used for subsequent rendering calls. | |
void | image (const array &in, const char *title=NULL) |
Renders the input array as an image to the window. | |
void | plot3 (const array &in, const char *title=NULL) |
Renders the input array as an 3d line plot to the window. | |
void | plot (const array &in, const char *const title=NULL) |
Renders the input arrays as a 2D or 3D plot to the window. | |
void | plot (const array &X, const array &Y, const array &Z, const char *const title=NULL) |
Renders the input arrays as a 3D plot to the window. | |
void | plot (const array &X, const array &Y, const char *const title=NULL) |
Renders the input arrays as a 2D plot to the window. | |
void | scatter (const array &in, const af::markerType marker=AF_MARKER_POINT, const char *const title=NULL) |
Renders the input arrays as a 2D or 3D scatter-plot to the window. | |
void | scatter (const array &X, const array &Y, const array &Z, const af::markerType marker=AF_MARKER_POINT, const char *const title=NULL) |
Renders the input arrays as a 3D scatter-plot to the window. | |
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. | |
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. | |
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. | |
void | surface (const array &S, const char *const title=NULL) |
Renders the input arrays as a 3D surface plot to the window. | |
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. | |
void | vectorField (const array &points, const array &directions, const char *const title=NULL) |
Renders the input arrays as a 2D or 3D vector field plot to the window. | |
void | vectorField (const array &xPoints, const array &yPoints, const array &zPoints, const array &xDirs, const array &yDirs, const array &zDirs, const char *const title=NULL) |
Renders the input arrays as a 3D vector field plot to the window. | |
void | vectorField (const array &xPoints, const array &yPoints, const array &xDirs, const array &yDirs, const char *const title=NULL) |
Renders the input arrays as a 2D vector field plot to the window. | |
void | setAxesLimits (const array &x, const array &y, const bool exact=false) |
Setup the axes limits for a 2D histogram/plot/vector field. | |
void | setAxesLimits (const array &x, const array &y, const array &z, const bool exact=false) |
Setup the axes limits for a histogram/plot/surface/vector field. | |
void | setAxesLimits (const float xmin, const float xmax, const float ymin, const float ymax, const bool exact=false) |
Setup the axes limits for a histogram/plot/surface/vector field. | |
void | setAxesLimits (const float xmin, const float xmax, const float ymin, const float ymax, const float zmin, const float zmax, const bool exact=false) |
Setup the axes limits for a histogram/plot/surface/vector field. | |
void | setAxesTitles (const char *const xtitle="X-Axis", const char *const ytitle="Y-Axis", const char *const ztitle=NULL) |
Setup the axes titles for a plot/surface/vector field. | |
void | setAxesLabelFormat (const char *const xformat="4.1%f", const char *const yformat="4.1%f", const char *const zformat=NULL) |
Setup the axes label formats for charts. | |
void | grid (const int rows, const int cols) |
Setup grid layout for multiview mode in a window. | |
void | show () |
This function swaps the background buffer to current view and polls for any key strokes while the window was in focus. | |
bool | close () |
Check if window is marked for close. | |
void | setVisibility (const bool isVisible) |
Hide/Show the window. | |
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. | |
Window object to render af::arrays.
Windows are not CopyConstructible or CopyAssignable.
Definition at line 37 of file graphics.h.
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.
[in] | r | is row identifier where current object has to be rendered |
[in] | c | is column identifier where current object has to be rendered |
Definition at line 560 of file graphics.h.