假如我有一张已经画到canvas上的图片,那么如何在图片上街区一个区域Rect,然后在这个区域上画字符串,各位大神求指教!!!

解决方案 »

  1.   

    api:public void drawText (CharSequence text, int start, int end, float x, float y, Paint paint)Since: API Level 1
    Draw the specified range of text, specified by start/end, with its origin at (x,y), in the specified Paint. The origin is interpreted based on the Align setting in the Paint.
    Parameterstext The text to be drawn
    start The index of the first character in text to draw
    end (end - 1) is the index of the last character in text to draw
    x The x-coordinate of origin for where to draw the text
    y The y-coordinate of origin for where to draw the text
    paint The paint used for the text (e.g. color, size, style)