I have a textview with some text. Textview have touch events, so user can rotate, scale and translate text. For translation, rotation and scaling i'm using canvas. Canvas is doing this inside onDraw() function. Now i want to have outer bounds of text when it is scaled or rotated, can anybody help me. Thanks in Advance.
I try this piece of code to translate,rotate and scale text on canvas:
canvas.scale(fScaledFactorForTextview,fScaledFactorForTextview,getTextWidth() / (2.0f * getLineCount()) + fTranslationX, (getTextSize() * getLineCount()) / 2.0f + fTranslationY);
canvas.rotate(fDegrees, getTextWidth() / (2.0f * getLineCount()) + fTranslationX, (getTextSize() * getLineCount()) / 2.0f + fTranslationY);
canvas.translate(fTranslationX,fTranslationY);