0
androidはどのようにキャンバス上にテキストをレンダリングしますか?私がしている場合canvas.drawtextで使用されるテクスチャ
テキストには常に外部テクスチャが使用されていますか?これのテクスチャターゲットは何ですか?
androidはどのようにキャンバス上にテキストをレンダリングしますか?私がしている場合canvas.drawtextで使用されるテクスチャ
テキストには常に外部テクスチャが使用されていますか?これのテクスチャターゲットは何ですか?
Bitmap resized = Bitmap.createScaledBitmap(bmp、width、(bmp.getHeight()* width)/ bmp.getWidth()、true);
int oh1 = resized.getHeight();
System.out.println("Resize height-->" + oh1 + "resize width-->" + resized.getWidth());
Matrix matrix = new Matrix();
matrix.postRotate(90.0f);
Bitmap createBitmap = Bitmap.createBitmap(resized, 0, 0, resized.getWidth(), resized.getHeight(), matrix, true);
Bitmap mutableBitmap = createBitmap.copy(Config.ARGB_8888, true);
Canvas canvas = new Canvas(mutableBitmap);
Paint paint = new Paint();
paint.setColor(Color.YELLOW);
paint.setTextSize(20.0f);
paint.setTextAlign(Align.CENTER);
simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
String dateTime = simpleDateFormat.format(Calendar.getInstance().getTime());
System.out.println(dateTime);
canvas.drawText(dateTime, 150.0f, 100.0f, paint);
テクスチャ?どういう意味ですか? – pskink
@pskinkテキストにテクスチャや色を適用する必要があります。 – debonair
これは、 'drawText()'メソッド – pskink