MATLAB Programming/Psychtoolbox/Screen Commands/DrawRect

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Usage:

Screen(windowPtr,'FillRect',[color],[rect])

Fill rect. color is the clut index (scalar or [r g b] triplet) that you want to poke into each pixel; default produces white with the standard CLUT for this window's pixelSize. Default rect is entire screen, so you can use this function to clear the screen.