问题描述
什么是Java2D中的路径,子路径和终结点?
最常见的路径是线和立方贝塞尔分段的组合。这通过一系列moveTo,lineTo,curveTo和closePath方法进行程序化表示。这些对应于PostScript中相同名称的操作符(但小写),Java2D映像模型从中导出。 (此外,还有quadTo,这是一个二次Bezier段,但是这并不重要,如果需要,可以通过curveTo轻松模拟)。
子路径是段。它没有自己的类,但是对象可以包含多个子路径,每个子路径以它自己的moveTo()开始。
端点是每个线段末端的点。它们的(x,y)坐标是moveTo和lineTo的参数,以及curveTo的最后两个参数(其他参数是影响曲线段形状但不影响端点的控制点)。 b
$ b
希望这启迪。
I hope it is not a silly question:
What is path, subpath, and endpoint in Java2D?
Most commonly, a path is a combination of lines and cubic Bezier segments. This is represented procedurally by a sequence of moveTo, lineTo, curveTo, and closePath methods. These correspond to the operators of the same name in PostScript (but lowercased), from which the Java2D imaging model derives. (Also, there is quadTo, which is a quadratic Bezier segment, but this is less important and easily simulated by curveTo if needed).
A subpath is a connected sequence of segments. It doesn't have its own class, but a GeneralPath object can contain multiple subpaths, each beginning with its own moveTo().
Endpoints are the points at the ends of each line segment. Their (x, y) coordinates are the arguments to moveTo and lineTo, and the last two arguments to curveTo (the other arguments are "control points" which affect the shape of the curve segment but not the endpoints).
Hope this enlightens.
这篇关于什么是路径& Java2D中的子路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!