Oldbitcollector (Jeff)
09-17-2007, 07:57 AM
I'm attempting to do some calculated placement of text using "graphics"
I suspect that the 'justification' settings are getting in the way.
gr.textmode(1,1,6,5) ' width, height, spacing
gr.colorwidth(2,0) ' color, width
gr.text(0,0,string("a"))
With this example, the placement of 0,0 should have set the "A" at left/middle of the screen,
instead it's middle/middle. I suspect it has to do with the 5 in the 'gr.textmode' command,
but I can't understand the bits explanation in graphics. It's as if it's auto-centering.
Could someone tell me how to turn the 'justify' off that is centering the text based on content?
I'd like to define the exact position of the text with col,row
If I add a few more letters to the string (change the "a" to "Jeff Ledger') then it starts to behave the way
I'd like it to. This still is a problem for me as I want exact placement of one letter at a time.
[Can this be done? Or do I just not see it?]
thanks!
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.
— Calvin, of 'Calvin and Hobbes.
Post Edited (Oldbitcollector) : 9/17/2007 1:18:33 AM GMT
I suspect that the 'justification' settings are getting in the way.
gr.textmode(1,1,6,5) ' width, height, spacing
gr.colorwidth(2,0) ' color, width
gr.text(0,0,string("a"))
With this example, the placement of 0,0 should have set the "A" at left/middle of the screen,
instead it's middle/middle. I suspect it has to do with the 5 in the 'gr.textmode' command,
but I can't understand the bits explanation in graphics. It's as if it's auto-centering.
Could someone tell me how to turn the 'justify' off that is centering the text based on content?
I'd like to define the exact position of the text with col,row
If I add a few more letters to the string (change the "a" to "Jeff Ledger') then it starts to behave the way
I'd like it to. This still is a problem for me as I want exact placement of one letter at a time.
[Can this be done? Or do I just not see it?]
thanks!
Oldbitcollector
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Buttons . . . check. Dials . . . check. Switches . . . check. Little colored lights . . . check.
— Calvin, of 'Calvin and Hobbes.
Post Edited (Oldbitcollector) : 9/17/2007 1:18:33 AM GMT