本文整理汇总了Java中sun.java2d.pipe.ShapeSpanIterator.setOutputArea方法的典型用法代码示例。如果您正苦于以下问题:Java ShapeSpanIterator.setOutputArea方法的具体用法?Java ShapeSpanIterator.setOutputArea怎么用?Java ShapeSpanIterator.setOutputArea使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sun.java2d.pipe.ShapeSpanIterator
的用法示例。
在下文中一共展示了ShapeSpanIterator.setOutputArea方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validateCompClip
import sun.java2d.pipe.ShapeSpanIterator; //导入方法依赖的package包/类
protected void validateCompClip() {
int origClipState = clipState;
if (usrClip == null) {
clipState = CLIP_DEVICE;
clipRegion = devClip;
} else if (usrClip instanceof Rectangle2D) {
clipState = CLIP_RECTANGULAR;
if (usrClip instanceof Rectangle) {
clipRegion = devClip.getIntersection((Rectangle)usrClip);
} else {
clipRegion = devClip.getIntersection(usrClip.getBounds());
}
} else {
PathIterator cpi = usrClip.getPathIterator(null);
int box[] = new int[4];
ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
try {
sr.setOutputArea(devClip);
sr.appendPath(cpi);
sr.getPathBox(box);
Region r = Region.getInstance(box);
r.appendSpans(sr);
clipRegion = r;
clipState =
r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
} finally {
sr.dispose();
}
}
if (origClipState != clipState &&
(clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
{
validFontInfo = false;
invalidatePipe();
}
}
示例2: validateCompClip
import sun.java2d.pipe.ShapeSpanIterator; //导入方法依赖的package包/类
protected void validateCompClip() {
int origClipState = clipState;
if (usrClip == null) {
clipState = CLIP_DEVICE;
clipRegion = devClip;
} else if (usrClip instanceof Rectangle2D) {
clipState = CLIP_RECTANGULAR;
clipRegion = devClip.getIntersection((Rectangle2D) usrClip);
} else {
PathIterator cpi = usrClip.getPathIterator(null);
int box[] = new int[4];
ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
try {
sr.setOutputArea(devClip);
sr.appendPath(cpi);
sr.getPathBox(box);
Region r = Region.getInstance(box, sr);
clipRegion = r;
clipState =
r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
} finally {
sr.dispose();
}
}
if (origClipState != clipState &&
(clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
{
validFontInfo = false;
invalidatePipe();
}
}
示例3: validateCompClip
import sun.java2d.pipe.ShapeSpanIterator; //导入方法依赖的package包/类
protected void validateCompClip() {
int origClipState = clipState;
if (usrClip == null) {
clipState = CLIP_DEVICE;
clipRegion = devClip;
} else if (usrClip instanceof Rectangle2D) {
clipState = CLIP_RECTANGULAR;
clipRegion = devClip.getIntersection((Rectangle2D) usrClip);
} else {
PathIterator cpi = usrClip.getPathIterator(null);
int box[] = new int[4];
ShapeSpanIterator sr = LoopPipe.getFillSSI(this);
try {
sr.setOutputArea(devClip);
sr.appendPath(cpi);
sr.getPathBox(box);
Region r = Region.getInstance(box);
r.appendSpans(sr);
clipRegion = r;
clipState =
r.isRectangular() ? CLIP_RECTANGULAR : CLIP_SHAPE;
} finally {
sr.dispose();
}
}
if (origClipState != clipState &&
(clipState == CLIP_SHAPE || origClipState == CLIP_SHAPE))
{
validFontInfo = false;
invalidatePipe();
}
}