如何在Android的绘制,当你设置线的宽度是多少? [英] How do you set a line's width when drawing in Android?

查看:151
本文介绍了如何在Android的绘制,当你设置线的宽度是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置线宽?是用什么方法呢?

How to set Line width? What method is used for it?

推荐答案

查看 <一个href="http://developer.android.com/reference/android/graphics/Paint.html#setStrokeWidth%28float%29"><$c$c>Paint.setStrokeWidth().

您绘制通过各种 <一个href="http://developer.android.com/reference/android/graphics/drawable/package-summary.html"><$c$c>Drawable对象。本身是从如何吸引他们的指示分离的对象;是的覆盖的 <一个href="http://developer.android.com/reference/android/graphics/Paint.html"><$c$c>Paint类。 油漆情况下,有一个方法,可以让你设置将用于绘制对象笔画的宽度, <一个href="http://developer.android.com/reference/android/graphics/Paint.html#setStrokeWidth%28float%29"><$c$c>setStrokeWidth(),这是你想要的。

You draw by making various Drawable objects. The objects themselves are separated from the instructions about how to draw them; that's covered by the Paint class. Paint instances have a method that allows you set the width of the stroke that will be used to draw the objects, setStrokeWidth(), which is what you want.

这篇关于如何在Android的绘制,当你设置线的宽度是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆