how to get length and width of printed string
in
Programming Questions
•
1 year ago
The program places rectangles on the screen in known locations.
(i refer to each rectangle by it's center point)
I want to place the string name of each rectangle inside of the corresponding rectangle.
I want to place the string name of each rectangle inside of the corresponding rectangle.
I've done this but the text in the rectangle is not centered
when i print using "text(string,x,y)", the (x,y) is the bottom left side of the string.
I'm figuring the best way to solve this, is to find the length and width of each printed string and shift accordingly
Question: How do I find the length and width of a printed string?
when i print using "text(string,x,y)", the (x,y) is the bottom left side of the string.
I'm figuring the best way to solve this, is to find the length and width of each printed string and shift accordingly
Question: How do I find the length and width of a printed string?
or
is there another way I can easily print the string so that the center of it is on the center point of the rectangle?
thank you very much for your time in advance!
thank you very much for your time in advance!
1