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 window) | |
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 &in, const char *const title=NULL) |
Renders the input arrays as a 2D or 3D plot to the window. More... | |
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. 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 &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. More... | |
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. 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 | 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. More... | |
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. More... | |
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. More... | |
void | setAxesLimits (const array &x, const array &y, const bool exact=false) |
Setup the axes limits for a 2D histogram/plot/vector field. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. 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.
Definition at line 37 of file graphics.h.
|
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.
[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.