Hi all,
I am curious if there is a function that allows PTB users to move the
contents of a group of
pixels to another location quickly and return the original pixel
group to the background
color.
I want to use Screen('fillrect') to create small dots on the screen
and then move them to
another location in real-time (not a premade movie). However,
'fillrect' puts limitations on
the amount of dots I can produce each frame and, to my knowledge, how
many dots I can
move. This is because (the way I am doing this), in order to "move"
a dot, I need to not
only call 'fillrect' to fill the new dot location, but I need to
'fillrect' to change the old dot
location back to the background. This means that can make (about)
two fewer new dots
than if I didn't move any dots. Depending on how many dots I want to
move between
frames, this can be QUITE costly to my ability to produce new dots
elsewhere.
If I could quickly move the dots to another location, however, I
would not have to make
two extra calls to 'fillrect' per moved dot and the cost in time to
move dots would
(hopefully) by much less.
I looked trough all the screen commands without any luck and a search
of topics related to
moving onscreen stimuli on the forum didn't turn up any help either.
Of note, I did read a
post (1182) that mentioned a MoveRect, ShiftRect, or RectShift
function. I have no idea
what exactly that refers to.
Thanks for your help,
Seth
I am curious if there is a function that allows PTB users to move the
contents of a group of
pixels to another location quickly and return the original pixel
group to the background
color.
I want to use Screen('fillrect') to create small dots on the screen
and then move them to
another location in real-time (not a premade movie). However,
'fillrect' puts limitations on
the amount of dots I can produce each frame and, to my knowledge, how
many dots I can
move. This is because (the way I am doing this), in order to "move"
a dot, I need to not
only call 'fillrect' to fill the new dot location, but I need to
'fillrect' to change the old dot
location back to the background. This means that can make (about)
two fewer new dots
than if I didn't move any dots. Depending on how many dots I want to
move between
frames, this can be QUITE costly to my ability to produce new dots
elsewhere.
If I could quickly move the dots to another location, however, I
would not have to make
two extra calls to 'fillrect' per moved dot and the cost in time to
move dots would
(hopefully) by much less.
I looked trough all the screen commands without any luck and a search
of topics related to
moving onscreen stimuli on the forum didn't turn up any help either.
Of note, I did read a
post (1182) that mentioned a MoveRect, ShiftRect, or RectShift
function. I have no idea
what exactly that refers to.
Thanks for your help,
Seth