android - How can we specify the text size, type, density when creating bitmap -


i'm trying create bitmap text on it. i'm having troubles in specifying options text, size, type, smoothness.

here code:

bitmap resultbitmap=bitmap.createbitmap(384,384, bitmap.config.argb_8888); canvas canvas = new canvas(resultbitmap); canvas.drawcolor(color.white); paint paint = new paint(); paint.setcolor(color.black); // text color   paint.setstrokewidth(24); // text size       paint.setxfermode(new porterduffxfermode(porterduff.mode.src_over)); // text overlapping pattern  // more settings... canvas.drawbitmap(resultbitmap, 0, 0, paint); canvas.drawtext("00: text", 300, 10, paint); 

these options available in paint used draw text on canvas. check autocomplete on android studio. note color paints original color, there's no settextcolor method available. enter image description here


Comments

Popular posts from this blog

command line - Use qwinsta in PowerShell ISE -

java - Incorrect order of records in M-M relationship in hibernate -

Python website log in: BIG-IP can not find session information in the request -