If anyone finds this question, there is a response here: http://stackoverflow.com/questions/2448103/drawpostext-in-android-graphics-canvas-what-is-origin
"If you're in left alignment, the text origin is the bottom left corner. If you're in center alignment, the text is centered horizontally and the origin is bottom center. You can get the height of the text with Math.abs(p.ascent()) + p.descent() where p is your Paint." On Mar 14, 1:36 pm, Nathan Simpson <nathaniel.simp...@gmail.com> wrote: > Hi, > > I have been trying to figure out precisely how drawPosText positions > characters on a Bitmap. > > According to the documentation, I pass drawPosText an array "pos" > which is "Array of [x,y] positions, used to position each character." > If I pass position {0,0} to drawPosText, it looks like the characters > are drawn up and to the right, i.e. the characters are drawn off of > the top of the Bitmap (which, as I understand it, has its origin as > {0,0} at top-left and bottom-right is {1,1}). Is this assumption > correct? > > If so, presume this means that I need to offset the y position by > the height of a character, but I don't know exactly how drawPosText is > calculating character height. Using Paint.FontMetrics, is it the > difference between top and bottom or ascent and descent, and does it > include leading or not (or is there some entirely different way I'm > supposed to get this information)? > > Thanks, > > Nathan -- 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