How to write text on an image

前端 未结 4 1066
鱼传尺愫
鱼传尺愫 2020-12-14 04:56

I can do this in Objective-C on the iPhone, but now I\'m looking for the equivalent Android Java code. I can also do it in plain Java, but I don\'t know what the Android spe

4条回答
  •  误落风尘
    2020-12-14 05:25

    What about something like:

    Bitmap bitmap = ... // Load your bitmap here
    Canvas canvas = new Canvas(bitmap);
    Paint paint = new Paint(); 
    paint.setColor(Color.BLACK); 
    paint.setTextSize(10); 
    canvas.drawText("Some Text here", x, y, paint);
    

提交回复
热议问题