开发者

Android alternative for Line2D?

I'm trying to translate some Java-speak into Android-Java-speak, and have a bit of code开发者_如何学Go involving Point2Ds and Line2Ds. I know Point2D.Float's equivalent is PointF, but is there anything similar to Line2D or am I going to have to restructure and rewrite this entirely? If so... help?


You can use Path for example:

Paint paint = new Paint();
paint.setStyle(Paint.Style.STROKE);
paint.setStrokeWidth(5);

paint.setColor(Color.WHITE);
Path line2d = new Path();
// just example for line could be complex shape
line2d.moveTo(pointF1.x, pointF1.y);
line2d.lineTo(pointF2.x, pointF2.y);
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜