MasterScan
Lab_Matlab_control Master Branch
|
Draw images from files.
dotsDrawableImages works the same way as its superclass, dotsDrawableTextures, except that instead of specifying a textureMakerFevalable, users specify a cell array of image file names. dotsDrawableImages uses an internal textureMakerFevalable which reads the image files and creates a texture for each one.
dotsDrawableImages automatically fills in pixelHeights, pixelWidths, and pixelColors, during prepareToDrawInWindow();
Each file name and image file must be readable by Matlab's builtin imread() function. File names may include paths.
Properties and Events | |
Property | fileNames = {} |
cell array of image file names | |
Property | pixelHeights |
pixel height of each image | |
Property | pixelWidths |
pixel width of each image | |
Property | pixelColors |
number of colors per pixel for each image | |
Property | colors |
kludge for topTaskHelperTarget | |
![]() | |
Property | x = 0 |
x-coordinate of the center of the drawn texture (degrees visual angle, centered in window) | |
Property | y = 0 |
y-coordinate of the center of the drawn texture (degrees visual angle, centered in window) | |
Property | width = [] |
width of the drawn texture (degrees visual angle, centered in window, defaults to unstretched and unflipped) | |
Property | height = [] |
height of the drawn texture (degrees visual angle, centered in window, defaults to unstretched and unflipped) | |
Property | slideNumber = 1 |
index for which texture to draw(), like a slide show | |
Property | isSmooth = false |
whether or not to stretch textures by interpolation (logical) | |
Property | isFlippedHorizontal = false |
wheter or not to flip the texture horizontally | |
Property | isFlippedVertical = false |
wheter or not to flip the texture vertically | |
Property | rotation = 0 |
degrees counterclockwise to rotate the texture about its center | |
Property | textureMakerFevalable = {} |
fevalable cell array for creating arbitrary textures More... | |
![]() | |
Property | isVisible = true |
true or false, whether to draw() this object | |
Methods | |
self | dotsDrawableImages () |
Constructor takes no arguments. | |
prepareToDrawInWindow (self) | |
Make a new texture(s) with textureMakerFevalable. | |
![]() | |
self | dotsDrawableTextures () |
Constructor takes no arguments. | |
set_textureMakerFevalable (self, textureMakerFevalable) | |
Keep track of required texture updates. | |
prepareToDrawInWindow (self) | |
Make a new texture(s) with textureMakerFevalable. | |
draw (self) | |
Draw textures that were made by textureMakerFevalable. | |
next (self) | |
Shorthand to increment slideNumber, up to nTextures. | |
previous (self) | |
Shorthand to decrement slideNumber, down to zero. | |
![]() | |
self | dotsDrawable () |
Constructor takes no arguments. | |
prepareToDrawInWindow (self) | |
Do any pre-draw setup that requires an OpenGL drawing window. | |
mayDrawNow (self) | |
Draw() or not, depending on isVisible and possibly other factors. | |
draw (self) | |
Subclass must redefine draw() to draw graphics. | |
show (self) | |
Shorthand to set isVisible=true. | |
hide (self) | |
Shorthand to set isVisible=false. | |
Static Methods | |
static textureInfo | imageTextureMakerFunction (self) |
Read each image file and create a texture for each. | |
![]() | |
static frameInfo | drawFrame (drawables, doClear) |
draw() several drawable objects and show the next Screen frame. More... | |
static ensemble | makeEnsemble (name, objects) |
Convenient utility for combining a bunch of drawables into an ensemble. More... | |
static frameInfo | drawEnsemble (ensemble, args, prepareFlag, showDuration, pauseDuration) |
Convenient utility for drawing an ensemble either locally or remotely. More... | |
Additional Inherited Members | |
![]() | |
Property | textureInfo = [] |
struct array of texture information returned from textureMakerFevalable. More... | |
Property | nTextures = 0 |
number of texture indexes to interleave | |
Property | isTextureStale = true |
whether or not the OpenGL texture needs updating | |