Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
cioffi42
cioffi42's Profile
1
Posts
1
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
how to get length and width of printed string
[2 Replies]
04-Aug-2012 12:53 PM
Forum:
Programming Questions
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'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?
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!
«Prev
Next »
Moderate user : cioffi42
Forum