Computer Science Canada

Relation between a text locate and a graphic locate

Author:  efan41 [ Mon Nov 30, 2009 2:45 pm ]
Post subject:  Relation between a text locate and a graphic locate

What is it you are trying to achieve?

I am trying to figure out if there is a simple algorithm to convert a graphic locate into a text locate


What is the problem you are having?
I'm not smart enough to figure it out on my own Laughing

Please specify what version of Turing you are using
4.0.5

I know that I cannot just take the coordinates from a graphic locate and use them with a text locate.A graphic locate uses each individual pixel on the screen as a reference instead of several pixels like the text locate, therefore when if I were to try and use a value of 625 (the 625th pixel), I'd get a max row error, 625 is greater than max row 125.

Author:  Tony [ Mon Nov 30, 2009 2:56 pm ]
Post subject:  RE:Relation between a text locate and a graphic locate

values of maxx and maxcol should give you enough information to figure this out.

Author:  andrew. [ Mon Nov 30, 2009 5:09 pm ]
Post subject:  RE:Relation between a text locate and a graphic locate

Here's an even bigger hint. To find the horizontal pixel size of one character's area: maxx/maxcol. To find the vertical pixel size: maxy/maxrow.

Author:  Tony [ Mon Nov 30, 2009 8:03 pm ]
Post subject:  RE:Relation between a text locate and a graphic locate

That hint is so big, it's almost a solution Laughing


: