开发者

Is it possible to "Draw" a string to a canvas?

开发者 https://www.devze.com 2023-03-15 13:04 出处:网络
I\'ve largely been using drawable resources to a canvas using a method similar to this: image.setBounds(x, y, ( x + 100 ), ( y + 100));

I've largely been using drawable resources to a canvas using a method similar to this:

image.setBounds(x, y, ( x + 100 ), ( y + 100));
image.draw(c);

I want to do the same thing with a string, or more开发者_如何学Python specifically an integer. Point is, I need to be able to display dynamically changeable characters on the canvas. Is there an easy method to do this similar to the drawable method above?


Try the Canvas.drawText(...) method


Use Graphics.drawString.

0

精彩评论

暂无评论...
验证码 换一张
取 消