本文整理汇总了Java中sun.java2d.SunGraphics2D.getSurfaceData方法的典型用法代码示例。如果您正苦于以下问题:Java SunGraphics2D.getSurfaceData方法的具体用法?Java SunGraphics2D.getSurfaceData怎么用?Java SunGraphics2D.getSurfaceData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sun.java2d.SunGraphics2D
的用法示例。
在下文中一共展示了SunGraphics2D.getSurfaceData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fillSpans
import sun.java2d.SunGraphics2D; //导入方法依赖的package包/类
private static void fillSpans(SunGraphics2D sg2d, SpanIterator si) {
// REMIND: Eventually, the plan is that it will not be possible for
// fs to be null since the FillSpans loop will be the fundamental
// loop implemented for any destination type...
if (sg2d.clipState == SunGraphics2D.CLIP_SHAPE) {
si = sg2d.clipRegion.filter(si);
// REMIND: Region.filter produces a Java-only iterator
// with no native counterpart...
} else {
sun.java2d.loops.FillSpans fs = sg2d.loops.fillSpansLoop;
if (fs != null) {
fs.FillSpans(sg2d, sg2d.getSurfaceData(), si);
return;
}
}
int spanbox[] = new int[4];
SurfaceData sd = sg2d.getSurfaceData();
while (si.nextSpan(spanbox)) {
int x = spanbox[0];
int y = spanbox[1];
int w = spanbox[2] - x;
int h = spanbox[3] - y;
sg2d.loops.fillRectLoop.FillRect(sg2d, sd, x, y, w, h);
}
}
示例2: TileContext
import sun.java2d.SunGraphics2D; //导入方法依赖的package包/类
public TileContext(SunGraphics2D sg, PaintContext pc) {
sunG2D = sg;
paintCtxt = pc;
paintModel = pc.getColorModel();
dstData = sg.getSurfaceData();
synchronized (AlphaPaintPipe.class) {
if (cachedLastColorModel != null &&
cachedLastColorModel.get() == paintModel)
{
this.lastRaster = cachedLastRaster;
this.lastData = cachedLastData;
}
}
}
示例3: renderBox
import sun.java2d.SunGraphics2D; //导入方法依赖的package包/类
public void renderBox(Object ctx, int x, int y, int w, int h) {
SunGraphics2D sg2d = (SunGraphics2D) ctx;
SurfaceData sd = sg2d.getSurfaceData();
sg2d.loops.fillRectLoop.FillRect(sg2d, sd, x, y, w, h);
}