Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
maiapujara

Junior Member
Registered:
Posts: 2
Reply with quote  #1 
Hello,

I've been trying to display a scene where a colored circle created by CircleGraphic is superimposed on top of a TaskObject image. However, the image is always displayed over the circle. Is there a way to switch the order that these images are presented so that the circle appears overlayed on the image?

Code:

tc1 = TimeCounter(null_);

tc1.Duration = image_preview;

  

crc1 = CircleGraphic(tc1);

crc1.EdgeColor = first_color;

crc1.FaceColor = first_color;

crc1.Size = 2;

crc1.Position = first_position;

scene1 = create_scene(crc1, first); % scene 1

Thanks,
Maia

 

0
Jaewon

Administrator
Registered:
Posts: 708
Reply with quote  #2 
Hi Maia,

In NIMH ML, a graphic object created earlier has a higher z-order (shown above others). TaskObjects are created before the timing script is executed and therefore have z-orders higher than stimuli created by adapters within the timing script. Changing z-orders is not easy without sacrificing some performance, so I don't think I will support it any time soon.

Your option is either to create both objects as TaskObjects or both by adapters. There is a new ImageGraphic adapter for the latter in the latest package.


ftp://helix.nih.gov/lsn/monkeylogic/ML2_doc/runtimefunctions.html#ImageGraphic

http://forums.monkeylogic.org/post/nimh-monkeylogic-2-8444337?pid=1305676135#post1305676135
0
maiapujara

Junior Member
Registered:
Posts: 2
Reply with quote  #3 
Thanks, Jaewon! I resolved the issue by using the ImageGraphic adapter:

Code:

tc1 = TimeCounter(null_);
tc1.Duration = image_preview;
crc1 = CircleGraphic(tc1);
crc1.EdgeColor = first_color;
crc1.FaceColor = first_color;
crc1.Size = 2;
crc1.Position = first_position;
img1 = ImageGraphic(crc1);
img1.ImageList = { ['luminance_controlled_images' filesep TrialRecord.User.images{first}], first_position }; 
scene1 = create_scene(img1); % scene 1

0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.