Follow up question:<div><br></div><div>Is there a substitute for stretch property in canvas?</div><div><br></div><div>Thanks,</div><div>Corona<br><br>On Monday, September 17, 2012 6:13:45 PM UTC-4, Corona wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Thanks David.<div><br></div><div>I have finally managed to load my images, with the script as follows:</div><div><br></div><div><div>Dim myRect As Rect</div><div><br></div><div>XRes = 1280</div><div>YRes = 768</div><div><br></div><div>'define source rect as full screen</div><div>src.Left = 0</div><div>src.Top = 0</div><div>src.Right = Display.Xres</div><div>src.Bottom = Display.Yres</div><div><br></div><div>'define destination rect as top left quadrant</div><div>dest.Left = 120</div><div>dest.Top = 180</div><div>dest.Right = Display.Xres + 424</div><div>dest.Bottom = Display.Yres + 283</div><div><br></div><div>'Canvas codes follows</div><div><br></div><div>My question is, how do the images appear (without fully covering the screen), given that my dest.Right and dest.Bottom variables are greater than the </div><div>set pixel co-oordinates in the E-Prime system? </div><br>On Monday, September 17, 2012 5:05:20 PM UTC-4, McFarlane, David wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">Corona,
<br>
<br>Addressing only point (2):  If you do that, then square images (e.g., 
<br>100 x 100) will not be square on your display (please do not take my 
<br>word for this, measure it for yourself).  At least, that is what 
<br>happened to us.
<br>
<br>Only after contacting PST Web Support did I learn that, with EP2, you 
<br>are not restricted to the resolution options in the dropdown menu, 
<br>you may manually enter any values you like there and as long as they 
<br>are valid for your display hardware EP2 will use it.  Better yet, 
<br>with EP2, set Display resolution to "Match desktop resolution at 
<br>runtime", then set your desired display resolution in Windows, and 
<br>EP2 will just use that.  Simple.
<br>
<br>Of course, this does not work for EP1, in which case you are sunk.
<br>
<br>-----
<br>David McFarlane
<br>E-Prime training 
<br>online:  <a href="http://psychology.msu.edu/Workshops_Courses/eprime.aspx" target="_blank">http://psychology.msu.edu/<wbr>Workshops_Courses/eprime.aspx</a>
<br>Twitter:  @EPrimeMaster (<a href="https://twitter.com/EPrimeMaster" target="_blank">https://twitter.com/<wbr>EPrimeMaster</a>)
<br>
<br>
<br>At 9/17/2012 01:13 PM Monday, Corona wrote:
<br>>Thank you all for your help so far. I have been reading a few posts 
<br>>on resolving image dimension issues. Here is what I have done so far:
<br>>
<br>>1) My system resolution is 1280 x 800
<br>>
<br>>2) I went to e-prime->experiment->devices-><wbr>display->edit->and 
<br>>changed to 1280 x 768 (I do not have 800 as a drop down option).
<br>>
<br>>3) My images have uniform pixel dimensions of 424 x 283 (bmp images).
<br>>
<br>>4) I am using canvas object given the large number of images I have:
<br>>
<br>>After loading the offscreen canvas, my script (based on a previous 
<br>>response to my question) is as shown below:
<br>>
<br>>xMargin = 120
<br>>yMargin = 120
<br>>
<br>>myRect.Left = xMargin
<br>>myRect.Right = xMargin + 424
<br>>myRect.Top = yMargin
<br>>myRect.Bottom = ymargin + 283
<br>>
<br>>However, this caused my images to be cropped. I played around with 
<br>>the numbers for xMargin, but did not get any satisfactory results 
<br>>(images are cropped on either length or width).
<br>>
<br>>Then, I resorted to trying this:
<br>>
<br>>XRes = 1280
<br>>YRes = 768
<br>>
<br>>'define source rect as full screen
<br>>src.Left = 120
<br>>src.Top = 120
<br>>src.Right = Display.XRes
<br>>src.Bottom = Display.YRes
<br>>
<br>>'define destination rect as top left quadrant
<br>>dest.Left = 120
<br>>dest.Top = 120
<br>>dest.Right = 120 + Display.XRes + 424
<br>>dest.Bottom = 120 + Display.YRes + 283
<br>>
<br>>This yielded better results, but my images are still cropped. What 
<br>>am I missing here? I changed screen dimensions on e-prime to 
<br>>approximately"match" my system's resolution, but still not getting 
<br>>the results I desire.
<br>>
<br>>Thank you again for your input,
<br>>Corona
<br>>
<br>>On Sunday, September 16, 2012 2:18:01 PM UTC-4, Corona wrote:
<br>>Thank you. I had looked at the site link you've given, but it was 
<br>>more a problem of running the validation tool that was failing 
<br>>(although I do have an original Vista version). Apparently, the 
<br>>error I encountered is quite common (or so, the Microsoft user 
<br>>forums suggest). I however, found a roundabout way, which may be 
<br>>useful for 
<br>>others: 
<br>><<a href="http://download.cnet.com/Help-Explorer-Viewer/3000-6675_4-10666661.html" target="_blank">http://download.cnet.com/<wbr>Help-Explorer-Viewer/3000-<wbr>6675_4-10666661.html</a>><a href="http://download.cnet.com/Help-Explorer-Viewer/3000-6675_4-10666661.html" target="_blank">http://<wbr>download.cnet.com/Help-<wbr>Explorer-Viewer/3000-6675_4-<wbr>10666661.html</a> 
<br>>. This software application works as a reader for .hlp files.
<br>>
<br>>Thank you for your suggestions. Now that I have the E-Basic help 
<br>>showing up(or visible), I can at least look it up.
<br>>
<br>>Corona.
<br>>
<br>>On Sunday, September 16, 2012 1:43:51 PM UTC-4, J wrote:
<br>>This should help with viewing help files in Windows Vista (as a 
<br>>novice e-basic programmer, I have to say that access to E-Basic Help 
<br>>is essential).
<br>>
<br>><<a href="http://support.microsoft.com/kb/917607" target="_blank">http://support.microsoft.<wbr>com/kb/917607</a>><a href="http://support.microsoft.com/kb/917607" target="_blank">http://support.<wbr>microsoft.com/kb/917607</a>
<br>>
<br>>J
<br>>
<br>>On 9/16/2012 11:36 AM, Corona wrote:
<br>>>Thank you. I do not have access to the e-prime basic help, due to 
<br>>>running a Windows-Vista, 64-bit system.  .hlp files are no longer 
<br>>>recognized by Vista-32. I tried installing a tool that allows .hlp 
<br>>>files to be read, but it somehow failing. Is there a workaround to 
<br>>>this, so I can view the e-prime basic files?
<br>>>
<br>>>Thanks,
<br>>>Corona
<br>>>
<br>>>On Sunday, September 16, 2012 11:39:37 AM UTC-4, Peter Quain wrote:
<br>>>
<br>>>I cannot think of why might else you would crave this knowledge. 
<br>>>The documention, topic Canvas, will help understanding this code, 
<br>>>you will need to if it is Canvas that you wish to use
<br>>>
<br>>>At 01:31 AM 17/09/2012, you wrote:
<br>>>>Thank you Alphonse, for the quick reply. More for the purpose of 
<br>>>>understanding the code, than anything else, why do you 
<br>>>>repeat  cnvs.Copy offScreenCnvs, myRect, myrect (with myrect 
<br>>>>twice)? More specifically, how is this understood by e-prime? 
<br>>>>Also, I am guessing I do not have to include a slideobject?
<br>>>>
<br>>>>
<br>>>>
<br>>>>On Sunday, September 16, 2012 10:59:26 AM UTC-4, alphonse wrote:
<br>>>>---------------------------<wbr>--------------------
<br>>>>'Prepare stimulus offscreen
<br>>>>offScreenCnvs.LoadImage stim
<br>>>>'Define the copy area
<br>>>>Dim myRect As Rect
<br>>>>myRect.Left = xMargin
<br>>>>myRect.Right = xMargin + 60
<br>>>>myRect.Top = yMargin
<br>>>>myRect.Bottom = yMargin + 60
<br>>>>'Copy prepared stimulus to screen
<br>>>>cnvs.Copy offScreenCnvs, myRect, myRect
<br>>>>---------------------------<wbr>------------------------------<wbr>-----------------
<br>>>>At 12:39 AM 17/09/2012, you wrote:
<br>>>>>I am currently running a dot probe task with visual paired 
<br>>>>>stimuli (positive, negative). I have a two fold question 
<br>>>>>pertaining to this task:
<br>>>>>1) I have about 60 images in one of my trialprocs, and was 
<br>>>>>therefore advised to use the canvas option to preload images. I 
<br>>>>>have had little success with using this object, particularly 
<br>>>>>because I do not entirely understand the concepts of off-screen 
<br>>>>>and on-screen canvas. I have managed to write a small script with 
<br>>>>>help from the references guides posted on the e-prime website (as 
<br>>>>>well as forums), but am stuck when it comes to the following statement:
<br>>>>>1.      When preparing the trial:
<br>>>>>
<br>>>>>targetCanvas.LoadImage stim
<br>>>>>
<br>>>>>Image is loaded to the top left corner. We need to define 2 Rect 
<br>>>>>Objects: StimLoadRect and StimRect (see Rect object in the 
<br>>>>>E-Basic Help), both the size of the images to-be-loaded, but the 
<br>>>>>StimRect at the (Left,Right, Top,Bottom) coordinates where the 
<br>>>>>stimulus will be displayed. When we copy the image from the 
<br>>>>>offline canvas to the online canvas, we will copy from 
<br>>>>>StimLoadRect to StimRect.
<br>>>>>
<br>>>>>2.      To run the stimulus:
<br>>>>>
<br>>>>>Display.<wbr>WaitForVerticalBlank
<br>>>>>c.setAttrib "StimOnset", clock.read
<br>>>>>cnvs.copy targetCanvas, stimLoadRect, stimRect
<br>>>>>sleep(stimDuration)
<br>>>>>Display.<wbr>WaitForVerticalBlank
<br>>>>>Cnvs.clear ' or something else that erases the stimulus, can be 
<br>>>>>done in the following trial
<br>>>>>
<br>>>>>
<br>>>>>Bolded lines: How do I create a stimLoadRect and stimRect image, 
<br>>>>>a is asked for? (I did find a script for creating a rect object, 
<br>>>>>but am unsure of how to specify dimensions).
<br>>>>>I assume that pre-defining images and their locations, means I do 
<br>>>>>not have to specify them as a SlideObject? (I am guessing I am 
<br>>>>>completely wrong here - please feel free to correct me) . I would 
<br>>>>>also assume that the stimDuration, must be defined as an attribute?
<br>>>>>
<br>>>>>Assuming I do not have to go through this convoluted path, I have 
<br>>>>>another question. If I could pre-load using the SlideImage and 
<br>>>>>ImageDisplay options, I am not sure how to specify the 
<br>>>>>co-ordinates of where I want my image to be in the properties 
<br>>>>>section. I know this appears elementary, but the actual size of 
<br>>>>>the images are 424 X 283, but when running, part of the images 
<br>>>>>are cut off. When I looked at the properties of my slide object, 
<br>>>>>I had set the width at 25% . I assumed this was the co-ordinate 
<br>>>>>location in relation to the actual screen size. Guessing that 
<br>>>>>this was an error on my part, I reset the width to 100%, but that 
<br>>>>>meant that when I looked at the slideobject (with the dotted 
<br>>>>>grid), one image seemed to complete cover the other image. How do 
<br>>>>>I fit both images, and make sure their dimensions remain the same?
<br>>>>>I apologize for this rant. I only recently switched to e-prime 
<br>>>>>from using Inquisit, and am still trying to get a hang of this software tool.
<br>>>>>Thanks a ton for your reply,
<br>>>>>Corona
<br>
<br></blockquote></div></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "E-Prime" group.<br />
To post to this group, send email to e-prime@googlegroups.com.<br />
To unsubscribe from this group, send email to e-prime+unsubscribe@googlegroups.com.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msg/e-prime/-/CBZok5cGpkoJ">https://groups.google.com/d/msg/e-prime/-/CBZok5cGpkoJ</a>.<br />
For more options, visit <a href="https://groups.google.com/groups/opt_out">https://groups.google.com/groups/opt_out</a>.<br />
 <br />
 <br />