`drawCircle()` 半径参数单位?
`drawCircle()` radius parameters units?
Canvas.drawCircle()
方法中半径参数的单位是什么?
是像素吗?还是下降?
http://developer.android.com/reference/android/graphics/Canvas.html#drawCircle(float, 浮动, 浮动, android.graphics.Paint)
我试图查看源代码以查看是否能得到任何想法,但该方法只是一个包装器,文档没有指定任何内容。
据official docs报道:
When you're writing an application in which you would like to perform specialized drawing and/or control the animation of graphics, you should do so by drawing through a Canvas. A Canvas works for you as a pretense, or interface, to the actual surface upon which your graphics will be drawn — it holds all of your "draw" calls. Via the Canvas, your drawing is actually performed upon an underlying Bitmap, which is placed into the window.
根据定义,位图使用 像素 ,而不是其他任何单位。
因此,所有drawXYZ()
方法都在px.
Canvas.drawCircle()
方法中半径参数的单位是什么?
是像素吗?还是下降?
http://developer.android.com/reference/android/graphics/Canvas.html#drawCircle(float, 浮动, 浮动, android.graphics.Paint)
我试图查看源代码以查看是否能得到任何想法,但该方法只是一个包装器,文档没有指定任何内容。
据official docs报道:
When you're writing an application in which you would like to perform specialized drawing and/or control the animation of graphics, you should do so by drawing through a Canvas. A Canvas works for you as a pretense, or interface, to the actual surface upon which your graphics will be drawn — it holds all of your "draw" calls. Via the Canvas, your drawing is actually performed upon an underlying Bitmap, which is placed into the window.
根据定义,位图使用 像素 ,而不是其他任何单位。
因此,所有drawXYZ()
方法都在px.