简体   繁体   English

在画布上缩放文字大小

[英]Scale text size on Canvas

I'm usint this class that provide to draw a cicle with inside a title and subtitle. 我用这个类提供一个在标题和副标题内绘制圆柱的类。 the code is this (i'm not the author): https://github.com/ylyc/circular_progress_bar/blob/master/src/com/lylc/widget/circularprogressbar/example/CircularProgressBar.java . 代码是这样的(我不是作者): https : //github.com/ylyc/circular_progress_bar/blob/master/src/com/lylc/widget/circularprogressbar/example/CircularProgressBar.java All works fine but when the subtitle text is more large it outside of the parent.. how can i scale this programmatically according to the screen resolutions? 一切正常,但是当字幕文本在父级之外更大时,我如何根据屏幕分辨率以编程方式缩放此字幕? Thanks. 谢谢。

check this out http://docs.oracle.com/javase/1.5.0/docs/api/ it has all of the methods in java in it. 请访问http://docs.oracle.com/javase/1.5.0/docs/api/ ,查看其中的所有Java方法。 just look up the class of the object for the text and see if there is one. 只需查找文本对象的类,看看是否有一个。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM