Centering by Word in Canvas

Brendan T btomoschuk at gmail.com
Tue Oct 8 13:32:05 UTC 2013


Hello all,

I have a small problem in my experiment design I was hoping you guys could 
shed some light on.

My project uses the canvas function to display both words and circles 
around the word (big enough to be in the periphery) but the problem is that 
canvas doesn't allow you to align words to the center. It produces words on 
the canvas as such:

cnvs.Text Display.XRes/2, Displaly.YRes/2, c. getattrib("WordList1")
'This pulls a word from wordList1 and puts it in the center of the screen 
such that the first letter is centered at XRes/2, YRes/2


This centers the image based on the number of pixels on the screen, which 
is fine (and necessary) for my circle but aligns the words such that the 
first letter of the word is at the center. Words can be easily aligned in 
the display feature, but canvas is necessary for my other stimuli.

Does anybody know how this might be fixed such that the word is centered in 
canvas, regardless of word length? Is it possible to overlay a regular 
display with canvas? Or perhaps a way to factor word length in and subtract 
half of it from XRes/2?

I appreciate any feedback and I hope the issue is clear.

Thank you!!
Brendan

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/15c47ed7-1d3f-4f5b-9fab-4ea08e6eebe7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20131008/43d94b5d/attachment.htm>


More information about the Eprime mailing list