public class FlatteningPathIterator extends Object implements PathIterator
SEG_CLOSE, SEG_CUBICTO, SEG_LINETO, SEG_MOVETO, SEG_QUADTO, WIND_EVEN_ODD, WIND_NON_ZERO
Constructor and Description |
---|
FlatteningPathIterator(PathIterator src, double flatness)
构建了一种新的
FlatteningPathIterator 对象,展平一个路径遍历它。
|
FlatteningPathIterator(PathIterator src, double flatness, int limit)
构建了一种新的
FlatteningPathIterator 对象,展平一个路径遍历它。
|
Modifier and Type | Method and Description |
---|---|
int |
currentSegment(double[] coords)
返回迭代中当前路径段的坐标和类型。
|
int |
currentSegment(float[] coords)
返回迭代中当前路径段的坐标和类型。
|
double |
getFlatness()
返回此迭代器的平坦度。
|
int |
getRecursionLimit()
返回此迭代器的递归限制。
|
int |
getWindingRule()
返回确定路径内部的卷绕规则。
|
boolean |
isDone()
测试,如果迭代完成。
|
void |
next()
移动迭代器到下一个路径的下一个部分,沿着遍历的主要方向,只要有更多的点在该方向。
|
public FlatteningPathIterator(PathIterator src, double flatness)
FlatteningPathIterator
对象,展平一个路径遍历它。迭代器不细分曲线从源值超过10层的细分,产生一个最大的1024个直线段每曲线读。
src
-原来不平的路径遍历
flatness
-控制点和平坦的曲线之间的最大距离
public FlatteningPathIterator(PathIterator src, double flatness, int limit)
FlatteningPathIterator
对象,展平一个路径遍历它。的
limit
参数可以控制递归细分,迭代器还可以假定曲线平坦,没有足够的测量对
flatness
参数的最大数目。扁平的迭代因此不产生超过最大
(2^limit)
线段曲线。
src
-原来不平的路径遍历
flatness
-控制点和平坦的曲线之间的最大距离
limit
-递归细分允许任何弯曲段的最大数量
IllegalArgumentException
-如果
flatness
或
limit
小于零
public double getFlatness()
FlatteningPathIterator
平整。
public int getRecursionLimit()
FlatteningPathIterator
递归极限。
public int getWindingRule()
getWindingRule
接口
PathIterator
PathIterator.WIND_EVEN_ODD
,
PathIterator.WIND_NON_ZERO
public boolean isDone()
isDone
接口
PathIterator
true
如果所有段已读;
false
否则。
public void next()
next
接口
PathIterator
public int currentSegment(float[] coords)
currentSegment
接口
PathIterator
coords
保存数据
NoSuchElementException
-如果没有更多的元素在平坦道路被退回。
PathIterator.SEG_MOVETO
,
PathIterator.SEG_LINETO
,
PathIterator.SEG_CLOSE
public int currentSegment(double[] coords)
currentSegment
接口
PathIterator
coords
-数组保存数据从该方法返回
NoSuchElementException
-如果没有更多的元素在平坦道路被退回。
PathIterator.SEG_MOVETO
,
PathIterator.SEG_LINETO
,
PathIterator.SEG_CLOSE
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.