Android中是否有类似append()之类的Path方法?
我想将一行添加到路径中,但没有看到类似于 appened
的方法(在 Java 中会使用 GeneralPath.append(new Line2D.double) )< /em>
例如,在 Java 代码中我有类似的内容:
GeneralPath thePlots = new GeneralPath();
thePlots[CONST_INT].append(new Line2D.Double(centerX, centerY, xy[0], xy[1]), false);
//later I draw my line and whatever other points I have
但是,在 Android 中我没有看到附加选项(或 Line2D)。除了使用canvas.drawLine()然后绘制其余点之外,还有其他方法可以做到这一点吗?
I have a line that I would like to add to a Path but don't see a method similar to appened
(in Java one would use GeneralPath.append(new Line2D.double) )
For instance, in Java code I have something like:
GeneralPath thePlots = new GeneralPath();
thePlots[CONST_INT].append(new Line2D.Double(centerX, centerY, xy[0], xy[1]), false);
//later I draw my line and whatever other points I have
However, in Android I don't see the option to append (or Line2D for that matter). Is there an alternative way of doing this rather than using canvas.drawLine()
and then drawing the rest of the points?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您看过 Path 吗?
Have you looked at Path?