I am engaged in writing a corporate program, one of its functions is the imposition of an arbitrary text on a new photo. To do this, use ImageView to display the image itself and TextView to determine the location of the text, as well as its size, color, etc.
Screenshot of the example: 
Faced 2 problems:
1) The position of the text along the Y axis is incorrectly determined. I visited various methods, stopped at such a function (I submit the coordinates of TextView in x and y, using the function getX () and getY (), respectively):
private float[] getXY(ImageView iv, Bitmap bm, float x, float y){ float projectedX = (float) ((double)x * ((double)bm.getWidth()/(double)iv.getWidth())); float projectedY = (float) ((double)y * ((double)bm.getHeight()/(double)iv.getHeight())); return new float[]{projectedX, projectedY}; } Tried through the matrix, the result is even worse. Can anyone come across? How to align the Y axis so that it corresponds to the coordinates.
2) As you can see in the image, the text size in TextView is larger than that drawn with Canvas, I understand that the resolution of the image itself plays a role there, but is there a way to maintain the correct proportion of the text? So that the size of the text on the preview corresponds to the drawn size.