当前位置: 动力学知识库 > 问答 > 编程问答 >

Does Android include libraries simliar to java.awt.geom?

问题描述:

I have been browsing the reference section on Android.com and couldn't quite find the java.awt.geom library. I'm aware it isn't included exactly as it is with Java.

Specifically I'm looking for java.awt.geom.Point2D and java.awt.Ellipse2D.

Is Point (http://developer.android.com/reference/android/graphics/Point.html) equivalent to Point2D in Java? Looking at the methods, they are slightly different, but is this the Android equivalent? Or is there Point2D elsewhere that I've missed?

As for java.awt.Ellipse2D I don't really see anything that replaces it. I see addCircle, addOval, and addRoundedRect. Is there Ellipse or an equivalent for Android?

网友答案:

You may want to look at http://developer.android.com/reference/android/graphics/drawable/shapes/package-summary.html: it has an OvalShape you can modify the height/width to get an ellipse.

分享给朋友:
您可能感兴趣的文章:
随机阅读: