当前位置: 首页>>代码示例>>Java>>正文


Java SunGraphics2D.getSurfaceData方法代码示例

本文整理汇总了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);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:LoopPipe.java

示例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;
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:AlphaPaintPipe.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:SpanShapeRenderer.java


注:本文中的sun.java2d.SunGraphics2D.getSurfaceData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。