You can get various text size values either using Paint#getFontMetrics or Paint#getTextBounds.

Pepijn

On 24/03/2011 08:55, a a wrote:
I want to draw a text and rect like following:

1.a, b, c, d are vertex, actually, there is not exist the four vertex.
here is just for mark the rectangle.
2. "ac", "bd", "cd" are rectangle's border (noncontinuous line is
solid border, like "ac" and "bd" and "cd" is a solid border,)
3. it only know the a,b,c,d's coord, but don't know the "e" and "f"
a_________b
|                 |
|                 |
e_________f
|  name       |
c--------------d

Firstly, i draw a big rectangle var canvas.drawRect() which marked
with "a-b-c-d" vectex.
Secondly, i draw the tag "name" var canvas.drawText()

my  question is how can i draw a solid border up the "name" which
marked with "ef" border ? i think i should get the tag "name" height
then calculate with "c" or "d".


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to