Convert Text To Bitmap(Pixel) on Android

前端 未结 1 1239
清酒与你
清酒与你 2021-02-09 06:28

I have an android application in which I need to download text from a website, convert it into bitmap format and display it on an LED-based display board.

I am strugglin

1条回答
  •  醉梦人生
    2021-02-09 07:06

    I think you draw outside the image. Try setting y to 16.

    c.drawText("0", 0, 16, paint);
    

    Note that when drawing text the coordinate origin is the lower left coordinate corner.

    0 讨论(0)
提交回复
热议问题