MATLAB Programming/Psychtoolbox/Screen Commands/DrawLine

From Wikibooks, open books for an open world
< MATLAB Programming‎ | Psychtoolbox‎ | Screen Commands
Jump to: navigation, search

Usage:

Screen('DrawLine',windowPtr,[color],fromH,fromV,toH,toV,[penWidth],[penHeight],[penMode])

Draw a line. color is the clut index (scalar or [r g b] triplet) that you want to poke into each pixel. Default is black. Default penWidth and penHeight is 1. penMode specifies the drawing mode: The Win32 GDI interface does not have support for Copyin the Or and xOr modes. So the pen modes here represent the line styles of the pen: 'patCopy' (solid pen, default), 'patOr' (dashed), 'patXor' (dashdot), 'patBic' (dotted), 'notPatCopy' (invisible), 'notPatOr' (dashed), 'notPatXor' (dashdotdot), 'notPatBic' (inside frame).