public final class GeneralPath extends Path2D.Float
GeneralPath类表示的几何路径由直线和二次和三次(Bézier曲线é)。它可以包含多个子路径。
GeneralPath是一个遗留的最后一节课,完全实现了其超类的行为Path2D.Float。一起的Path2D.Double,Path2D类提供一个通用的几何路径,支持所有具有显式地选择不同级别的内部坐标精度的能力Shape和PathIterator接口功能全部实现。
使用Path2D.Float(或这类遗产GeneralPath)在处理的数据可以表示和使用浮点精度。使用数据要求精度或双精度范围Path2D.Double。
Path2D.Double, Path2D.FloatWIND_EVEN_ODD, WIND_NON_ZERO| Constructor and Description |
|---|
GeneralPath()
提出了一种新的
Path2D.WIND_NON_ZERO默认的缠绕规律空单精度
GeneralPath对象。
|
GeneralPath(int rule)
构建了一种新的
GeneralPath对象和指定的缠绕规律控制,需要对路径的内部被定义的操作。
|
GeneralPath(int rule, int initialCapacity)
提出了一种新的指定的缠绕规律
GeneralPath对象和指定的初始容量存储路径坐标。
|
GeneralPath(Shape s)
构建了一种新的
GeneralPath对象从任意
Shape对象。
|
append, clone, curveTo, curveTo, getBounds2D, getPathIterator, lineTo, lineTo, moveTo, moveTo, quadTo, quadTo, transformappend, closePath, contains, contains, contains, contains, contains, contains, contains, contains, createTransformedShape, getBounds, getCurrentPoint, getPathIterator, getWindingRule, intersects, intersects, intersects, intersects, reset, setWindingRulepublic GeneralPath()
Path2D.WIND_NON_ZERO默认的缠绕规律空单精度
GeneralPath对象。
public GeneralPath(int rule)
GeneralPath对象和指定的缠绕规律控制,需要对路径的内部被定义的操作。
rule的缠绕规律
Path2D.WIND_EVEN_ODD,
Path2D.WIND_NON_ZERO
public GeneralPath(int rule,
int initialCapacity)
GeneralPath对象和指定的缠绕规律及指定的初始容量存储路径坐标。这个数字是一个初步的猜测,有多少路径段将被添加到路径,但存储扩展,需要存储任何路径段添加。
rule的缠绕规律
initialCapacity -路径中的路径段数的估计
Path2D.WIND_EVEN_ODD,
Path2D.WIND_NON_ZERO
public GeneralPath(Shape s)
s -指定
Shape对象
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.