Java 类sun.awt.SunHints 实例源码

项目:OpenJSharp    文件:AAShapePipe.java   
public void renderPath(SunGraphics2D sg, Shape s, BasicStroke bs) {
    boolean adjust = (bs != null &&
                      sg.strokeHint != SunHints.INTVAL_STROKE_PURE);
    boolean thin = (sg.strokeState <= SunGraphics2D.STROKE_THINDASHED);

    Region clip = sg.getCompClip();
    int abox[] = new int[4];
    AATileGenerator aatg =
        renderengine.getAATileGenerator(s, sg.transform, clip,
                                        bs, thin, adjust, abox);
    if (aatg == null) {
        // Nothing to render
        return;
    }

    renderTiles(sg, s, aatg, abox);
}
项目:OpenJSharp    文件:LoopPipe.java   
public static ShapeSpanIterator getStrokeSpans(SunGraphics2D sg2d,
                                               Shape s)
{
    ShapeSpanIterator sr = new ShapeSpanIterator(false);

    try {
        sr.setOutputArea(sg2d.getCompClip());
        sr.setRule(PathIterator.WIND_NON_ZERO);

        BasicStroke bs = (BasicStroke) sg2d.stroke;
        boolean thin = (sg2d.strokeState <= SunGraphics2D.STROKE_THINDASHED);
        boolean normalize =
            (sg2d.strokeHint != SunHints.INTVAL_STROKE_PURE);

        RenderEngine.strokeTo(s,
                              sg2d.transform, bs,
                              thin, normalize, false, sr);
    } catch (Throwable t) {
        sr.dispose();
        sr = null;
        throw new InternalError("Unable to Stroke shape ("+
                                t.getMessage()+")", t);
    }
    return sr;
}
项目:OpenJSharp    文件:GlyphListLoopPipe.java   
protected void drawGlyphList(SunGraphics2D sg2d, GlyphList gl,
                             int aaHint) {
    switch (aaHint) {
     case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
         sg2d.loops.drawGlyphListLoop.
             DrawGlyphList(sg2d, sg2d.surfaceData, gl);
         return;
     case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         sg2d.loops.drawGlyphListAALoop.
             DrawGlyphListAA(sg2d, sg2d.surfaceData, gl);
         return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
        sg2d.loops.drawGlyphListLCDLoop.
            DrawGlyphListLCD(sg2d,sg2d.surfaceData, gl);
        return;
    }
}
项目:OpenJSharp    文件:X11TextRenderer.java   
public void drawGlyphVector(SunGraphics2D sg2d, GlyphVector g,
                            float x, float y)
{
    FontRenderContext frc = g.getFontRenderContext();
    FontInfo info = sg2d.getGVFontInfo(g.getFont(), frc);
    switch (info.aaHint) {
    case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
        super.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         sg2d.surfaceData.aaTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
         sg2d.surfaceData.lcdTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    default:
    }
}
项目:jdk8u-jdk    文件:AAShapePipe.java   
public void renderPath(SunGraphics2D sg, Shape s, BasicStroke bs) {
    boolean adjust = (bs != null &&
                      sg.strokeHint != SunHints.INTVAL_STROKE_PURE);
    boolean thin = (sg.strokeState <= SunGraphics2D.STROKE_THINDASHED);

    Region clip = sg.getCompClip();
    int abox[] = new int[4];
    AATileGenerator aatg =
        renderengine.getAATileGenerator(s, sg.transform, clip,
                                        bs, thin, adjust, abox);
    if (aatg == null) {
        // Nothing to render
        return;
    }

    renderTiles(sg, s, aatg, abox);
}
项目:jdk8u-jdk    文件:LoopPipe.java   
public static ShapeSpanIterator getStrokeSpans(SunGraphics2D sg2d,
                                               Shape s)
{
    ShapeSpanIterator sr = new ShapeSpanIterator(false);

    try {
        sr.setOutputArea(sg2d.getCompClip());
        sr.setRule(PathIterator.WIND_NON_ZERO);

        BasicStroke bs = (BasicStroke) sg2d.stroke;
        boolean thin = (sg2d.strokeState <= SunGraphics2D.STROKE_THINDASHED);
        boolean normalize =
            (sg2d.strokeHint != SunHints.INTVAL_STROKE_PURE);

        RenderEngine.strokeTo(s,
                              sg2d.transform, bs,
                              thin, normalize, false, sr);
    } catch (Throwable t) {
        sr.dispose();
        sr = null;
        throw new InternalError("Unable to Stroke shape ("+
                                t.getMessage()+")", t);
    }
    return sr;
}
项目:jdk8u-jdk    文件:GlyphListLoopPipe.java   
protected void drawGlyphList(SunGraphics2D sg2d, GlyphList gl,
                             int aaHint) {
    switch (aaHint) {
     case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
         sg2d.loops.drawGlyphListLoop.
             DrawGlyphList(sg2d, sg2d.surfaceData, gl);
         return;
     case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         sg2d.loops.drawGlyphListAALoop.
             DrawGlyphListAA(sg2d, sg2d.surfaceData, gl);
         return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
        sg2d.loops.drawGlyphListLCDLoop.
            DrawGlyphListLCD(sg2d,sg2d.surfaceData, gl);
        return;
    }
}
项目:jdk8u-jdk    文件:X11TextRenderer.java   
public void drawGlyphVector(SunGraphics2D sg2d, GlyphVector g,
                            float x, float y)
{
    FontRenderContext frc = g.getFontRenderContext();
    FontInfo info = sg2d.getGVFontInfo(g.getFont(), frc);
    switch (info.aaHint) {
    case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
        super.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         sg2d.surfaceData.aaTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
         sg2d.surfaceData.lcdTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    default:
    }
}
项目:openjdk-jdk10    文件:AAShapePipe.java   
public void renderPath(SunGraphics2D sg, Shape s, BasicStroke bs) {
    final boolean adjust = (bs != null &&
                      sg.strokeHint != SunHints.INTVAL_STROKE_PURE);
    final boolean thin = (sg.strokeState <= SunGraphics2D.STROKE_THINDASHED);

    final TileState ts = TILE_STATE_PROVIDER.acquire();
    try {
        final int[] abox = ts.abox;

        final AATileGenerator aatg =
            RDR_ENGINE.getAATileGenerator(s, sg.transform, sg.getCompClip(),
                                            bs, thin, adjust, abox);
        if (aatg != null) {
            renderTiles(sg, s, aatg, abox, ts);
        }
    } finally {
        TILE_STATE_PROVIDER.release(ts);
    }
}
项目:openjdk-jdk10    文件:LoopPipe.java   
public static ShapeSpanIterator getStrokeSpans(SunGraphics2D sg2d,
                                               Shape s)
{
    ShapeSpanIterator sr = new ShapeSpanIterator(false);

    try {
        sr.setOutputArea(sg2d.getCompClip());
        sr.setRule(PathIterator.WIND_NON_ZERO);

        BasicStroke bs = (BasicStroke) sg2d.stroke;
        boolean thin = (sg2d.strokeState <= SunGraphics2D.STROKE_THINDASHED);
        boolean normalize =
            (sg2d.strokeHint != SunHints.INTVAL_STROKE_PURE);

        RenderEngine.strokeTo(s,
                              sg2d.transform, bs,
                              thin, normalize, false, sr);
    } catch (Throwable t) {
        sr.dispose();
        sr = null;
        throw new InternalError("Unable to Stroke shape ("+
                                t.getMessage()+")", t);
    }
    return sr;
}
项目:openjdk-jdk10    文件:GlyphListLoopPipe.java   
protected void drawGlyphList(SunGraphics2D sg2d, GlyphList gl,
                             int aaHint) {
    switch (aaHint) {
     case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
         sg2d.loops.drawGlyphListLoop.
             DrawGlyphList(sg2d, sg2d.surfaceData, gl);
         return;
     case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         sg2d.loops.drawGlyphListAALoop.
             DrawGlyphListAA(sg2d, sg2d.surfaceData, gl);
         return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
        sg2d.loops.drawGlyphListLCDLoop.
            DrawGlyphListLCD(sg2d,sg2d.surfaceData, gl);
        return;
    }
}
项目:openjdk-jdk10    文件:X11TextRenderer.java   
public void drawGlyphVector(SunGraphics2D sg2d, GlyphVector g,
                            float x, float y)
{
    FontRenderContext frc = g.getFontRenderContext();
    FontInfo info = sg2d.getGVFontInfo(g.getFont(), frc);
    switch (info.aaHint) {
    case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
        super.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         SurfaceData.aaTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
         SurfaceData.lcdTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    default:
    }
}
项目:openjdk9    文件:AAShapePipe.java   
public void renderPath(SunGraphics2D sg, Shape s, BasicStroke bs) {
    final boolean adjust = (bs != null &&
                      sg.strokeHint != SunHints.INTVAL_STROKE_PURE);
    final boolean thin = (sg.strokeState <= SunGraphics2D.STROKE_THINDASHED);

    final TileState ts = tileStateProvider.acquire();
    try {
        final int[] abox = ts.abox;

        final AATileGenerator aatg =
            renderengine.getAATileGenerator(s, sg.transform, sg.getCompClip(),
                                            bs, thin, adjust, abox);
        if (aatg != null) {
            renderTiles(sg, s, aatg, abox, ts);
        }
    } finally {
        tileStateProvider.release(ts);
    }
}
项目:openjdk9    文件:LoopPipe.java   
public static ShapeSpanIterator getStrokeSpans(SunGraphics2D sg2d,
                                               Shape s)
{
    ShapeSpanIterator sr = new ShapeSpanIterator(false);

    try {
        sr.setOutputArea(sg2d.getCompClip());
        sr.setRule(PathIterator.WIND_NON_ZERO);

        BasicStroke bs = (BasicStroke) sg2d.stroke;
        boolean thin = (sg2d.strokeState <= SunGraphics2D.STROKE_THINDASHED);
        boolean normalize =
            (sg2d.strokeHint != SunHints.INTVAL_STROKE_PURE);

        RenderEngine.strokeTo(s,
                              sg2d.transform, bs,
                              thin, normalize, false, sr);
    } catch (Throwable t) {
        sr.dispose();
        sr = null;
        throw new InternalError("Unable to Stroke shape ("+
                                t.getMessage()+")", t);
    }
    return sr;
}
项目:openjdk9    文件:GlyphListLoopPipe.java   
protected void drawGlyphList(SunGraphics2D sg2d, GlyphList gl,
                             int aaHint) {
    switch (aaHint) {
     case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
         sg2d.loops.drawGlyphListLoop.
             DrawGlyphList(sg2d, sg2d.surfaceData, gl);
         return;
     case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         sg2d.loops.drawGlyphListAALoop.
             DrawGlyphListAA(sg2d, sg2d.surfaceData, gl);
         return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
        sg2d.loops.drawGlyphListLCDLoop.
            DrawGlyphListLCD(sg2d,sg2d.surfaceData, gl);
        return;
    }
}
项目:openjdk9    文件:X11TextRenderer.java   
public void drawGlyphVector(SunGraphics2D sg2d, GlyphVector g,
                            float x, float y)
{
    FontRenderContext frc = g.getFontRenderContext();
    FontInfo info = sg2d.getGVFontInfo(g.getFont(), frc);
    switch (info.aaHint) {
    case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
        super.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         SurfaceData.aaTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
         SurfaceData.lcdTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    default:
    }
}
项目:jdk8u_jdk    文件:AAShapePipe.java   
public void renderPath(SunGraphics2D sg, Shape s, BasicStroke bs) {
    boolean adjust = (bs != null &&
                      sg.strokeHint != SunHints.INTVAL_STROKE_PURE);
    boolean thin = (sg.strokeState <= SunGraphics2D.STROKE_THINDASHED);

    Region clip = sg.getCompClip();
    int abox[] = new int[4];
    AATileGenerator aatg =
        renderengine.getAATileGenerator(s, sg.transform, clip,
                                        bs, thin, adjust, abox);
    if (aatg == null) {
        // Nothing to render
        return;
    }

    renderTiles(sg, s, aatg, abox);
}
项目:jdk8u_jdk    文件:LoopPipe.java   
public static ShapeSpanIterator getStrokeSpans(SunGraphics2D sg2d,
                                               Shape s)
{
    ShapeSpanIterator sr = new ShapeSpanIterator(false);

    try {
        sr.setOutputArea(sg2d.getCompClip());
        sr.setRule(PathIterator.WIND_NON_ZERO);

        BasicStroke bs = (BasicStroke) sg2d.stroke;
        boolean thin = (sg2d.strokeState <= SunGraphics2D.STROKE_THINDASHED);
        boolean normalize =
            (sg2d.strokeHint != SunHints.INTVAL_STROKE_PURE);

        RenderEngine.strokeTo(s,
                              sg2d.transform, bs,
                              thin, normalize, false, sr);
    } catch (Throwable t) {
        sr.dispose();
        sr = null;
        throw new InternalError("Unable to Stroke shape ("+
                                t.getMessage()+")", t);
    }
    return sr;
}
项目:jdk8u_jdk    文件:GlyphListLoopPipe.java   
private void drawGlyphListSegment(SunGraphics2D sg2d, GlyphList gl, int fromglyph, int toGlyph,
                                  int aaHint, boolean isColor) {
    if (fromglyph >= toGlyph) return;
    if (isColor) {
        sg2d.loops.drawGlyphListColorLoop.
                DrawGlyphListColor(sg2d, sg2d.surfaceData, gl, fromglyph, toGlyph);
    } else {
        switch (aaHint) {
            case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
                sg2d.loops.drawGlyphListLoop.
                        DrawGlyphList(sg2d, sg2d.surfaceData, gl, fromglyph, toGlyph);
                return;
            case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
                sg2d.loops.drawGlyphListAALoop.
                        DrawGlyphListAA(sg2d, sg2d.surfaceData, gl, fromglyph, toGlyph);
                return;
            case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
            case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
                sg2d.loops.drawGlyphListLCDLoop.
                        DrawGlyphListLCD(sg2d, sg2d.surfaceData, gl, fromglyph, toGlyph);
                return;
        }
    }
}
项目:jdk8u_jdk    文件:X11TextRenderer.java   
public void drawGlyphVector(SunGraphics2D sg2d, GlyphVector g,
                            float x, float y)
{
    FontRenderContext frc = g.getFontRenderContext();
    FontInfo info = sg2d.getGVFontInfo(g.getFont(), frc);
    switch (info.aaHint) {
    case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
        super.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         sg2d.surfaceData.aaTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
         sg2d.surfaceData.lcdTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    default:
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:AAShapePipe.java   
public void renderPath(SunGraphics2D sg, Shape s, BasicStroke bs) {
    boolean adjust = (bs != null &&
                      sg.strokeHint != SunHints.INTVAL_STROKE_PURE);
    boolean thin = (sg.strokeState <= SunGraphics2D.STROKE_THINDASHED);

    Region clip = sg.getCompClip();
    int abox[] = new int[4];
    AATileGenerator aatg =
        renderengine.getAATileGenerator(s, sg.transform, clip,
                                        bs, thin, adjust, abox);
    if (aatg == null) {
        // Nothing to render
        return;
    }

    renderTiles(sg, s, aatg, abox);
}
项目:lookaside_java-1.8.0-openjdk    文件:LoopPipe.java   
public static ShapeSpanIterator getStrokeSpans(SunGraphics2D sg2d,
                                               Shape s)
{
    ShapeSpanIterator sr = new ShapeSpanIterator(false);

    try {
        sr.setOutputArea(sg2d.getCompClip());
        sr.setRule(PathIterator.WIND_NON_ZERO);

        BasicStroke bs = (BasicStroke) sg2d.stroke;
        boolean thin = (sg2d.strokeState <= SunGraphics2D.STROKE_THINDASHED);
        boolean normalize =
            (sg2d.strokeHint != SunHints.INTVAL_STROKE_PURE);

        RenderEngine.strokeTo(s,
                              sg2d.transform, bs,
                              thin, normalize, false, sr);
    } catch (Throwable t) {
        sr.dispose();
        sr = null;
        throw new InternalError("Unable to Stroke shape ("+
                                t.getMessage()+")", t);
    }
    return sr;
}
项目:lookaside_java-1.8.0-openjdk    文件:GlyphListLoopPipe.java   
protected void drawGlyphList(SunGraphics2D sg2d, GlyphList gl,
                             int aaHint) {
    switch (aaHint) {
     case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
         sg2d.loops.drawGlyphListLoop.
             DrawGlyphList(sg2d, sg2d.surfaceData, gl);
         return;
     case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         sg2d.loops.drawGlyphListAALoop.
             DrawGlyphListAA(sg2d, sg2d.surfaceData, gl);
         return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
        sg2d.loops.drawGlyphListLCDLoop.
            DrawGlyphListLCD(sg2d,sg2d.surfaceData, gl);
        return;
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:X11TextRenderer.java   
public void drawGlyphVector(SunGraphics2D sg2d, GlyphVector g,
                            float x, float y)
{
    FontRenderContext frc = g.getFontRenderContext();
    FontInfo info = sg2d.getGVFontInfo(g.getFont(), frc);
    switch (info.aaHint) {
    case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
        super.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         sg2d.surfaceData.aaTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
         sg2d.surfaceData.lcdTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    default:
    }
}
项目:marlin-graphics    文件:AAShapePipe.java   
public void renderPath(SunGraphics2D sg, Shape s, BasicStroke bs) {
    final boolean adjust = (bs != null
            && sg.strokeHint != SunHints.INTVAL_STROKE_PURE);
    final boolean thin = (sg.strokeState <= SunGraphics2D.STROKE_THINDASHED);

    final TileState ts = tileStateProvider.acquire();
    try {
        final int[] abox = ts.abox;

        final AATileGenerator aatg
                              = renderengine.getAATileGenerator(s, sg.transform, sg.getCompClip(),
                        bs, thin, adjust, abox);
        if (aatg != null) {
            renderTiles(sg, s, aatg, abox, ts);
        }
    } finally {
        tileStateProvider.release(ts);
    }
}
项目:infobip-open-jdk-8    文件:AAShapePipe.java   
public void renderPath(SunGraphics2D sg, Shape s, BasicStroke bs) {
    boolean adjust = (bs != null &&
                      sg.strokeHint != SunHints.INTVAL_STROKE_PURE);
    boolean thin = (sg.strokeState <= SunGraphics2D.STROKE_THINDASHED);

    Region clip = sg.getCompClip();
    int abox[] = new int[4];
    AATileGenerator aatg =
        renderengine.getAATileGenerator(s, sg.transform, clip,
                                        bs, thin, adjust, abox);
    if (aatg == null) {
        // Nothing to render
        return;
    }

    renderTiles(sg, s, aatg, abox);
}
项目:infobip-open-jdk-8    文件:LoopPipe.java   
public static ShapeSpanIterator getStrokeSpans(SunGraphics2D sg2d,
                                               Shape s)
{
    ShapeSpanIterator sr = new ShapeSpanIterator(false);

    try {
        sr.setOutputArea(sg2d.getCompClip());
        sr.setRule(PathIterator.WIND_NON_ZERO);

        BasicStroke bs = (BasicStroke) sg2d.stroke;
        boolean thin = (sg2d.strokeState <= SunGraphics2D.STROKE_THINDASHED);
        boolean normalize =
            (sg2d.strokeHint != SunHints.INTVAL_STROKE_PURE);

        RenderEngine.strokeTo(s,
                              sg2d.transform, bs,
                              thin, normalize, false, sr);
    } catch (Throwable t) {
        sr.dispose();
        sr = null;
        throw new InternalError("Unable to Stroke shape ("+
                                t.getMessage()+")", t);
    }
    return sr;
}
项目:infobip-open-jdk-8    文件:GlyphListLoopPipe.java   
protected void drawGlyphList(SunGraphics2D sg2d, GlyphList gl,
                             int aaHint) {
    switch (aaHint) {
     case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
         sg2d.loops.drawGlyphListLoop.
             DrawGlyphList(sg2d, sg2d.surfaceData, gl);
         return;
     case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         sg2d.loops.drawGlyphListAALoop.
             DrawGlyphListAA(sg2d, sg2d.surfaceData, gl);
         return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
        sg2d.loops.drawGlyphListLCDLoop.
            DrawGlyphListLCD(sg2d,sg2d.surfaceData, gl);
        return;
    }
}
项目:infobip-open-jdk-8    文件:X11TextRenderer.java   
public void drawGlyphVector(SunGraphics2D sg2d, GlyphVector g,
                            float x, float y)
{
    FontRenderContext frc = g.getFontRenderContext();
    FontInfo info = sg2d.getGVFontInfo(g.getFont(), frc);
    switch (info.aaHint) {
    case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
        super.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         sg2d.surfaceData.aaTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
         sg2d.surfaceData.lcdTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    default:
    }
}
项目:jdk8u-dev-jdk    文件:AAShapePipe.java   
public void renderPath(SunGraphics2D sg, Shape s, BasicStroke bs) {
    boolean adjust = (bs != null &&
                      sg.strokeHint != SunHints.INTVAL_STROKE_PURE);
    boolean thin = (sg.strokeState <= SunGraphics2D.STROKE_THINDASHED);

    Region clip = sg.getCompClip();
    int abox[] = new int[4];
    AATileGenerator aatg =
        renderengine.getAATileGenerator(s, sg.transform, clip,
                                        bs, thin, adjust, abox);
    if (aatg == null) {
        // Nothing to render
        return;
    }

    renderTiles(sg, s, aatg, abox);
}
项目:jdk8u-dev-jdk    文件:LoopPipe.java   
public static ShapeSpanIterator getStrokeSpans(SunGraphics2D sg2d,
                                               Shape s)
{
    ShapeSpanIterator sr = new ShapeSpanIterator(false);

    try {
        sr.setOutputArea(sg2d.getCompClip());
        sr.setRule(PathIterator.WIND_NON_ZERO);

        BasicStroke bs = (BasicStroke) sg2d.stroke;
        boolean thin = (sg2d.strokeState <= SunGraphics2D.STROKE_THINDASHED);
        boolean normalize =
            (sg2d.strokeHint != SunHints.INTVAL_STROKE_PURE);

        RenderEngine.strokeTo(s,
                              sg2d.transform, bs,
                              thin, normalize, false, sr);
    } catch (Throwable t) {
        sr.dispose();
        sr = null;
        throw new InternalError("Unable to Stroke shape ("+
                                t.getMessage()+")", t);
    }
    return sr;
}
项目:jdk8u-dev-jdk    文件:GlyphListLoopPipe.java   
protected void drawGlyphList(SunGraphics2D sg2d, GlyphList gl,
                             int aaHint) {
    switch (aaHint) {
     case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
         sg2d.loops.drawGlyphListLoop.
             DrawGlyphList(sg2d, sg2d.surfaceData, gl);
         return;
     case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         sg2d.loops.drawGlyphListAALoop.
             DrawGlyphListAA(sg2d, sg2d.surfaceData, gl);
         return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
        sg2d.loops.drawGlyphListLCDLoop.
            DrawGlyphListLCD(sg2d,sg2d.surfaceData, gl);
        return;
    }
}
项目:jdk8u-dev-jdk    文件:X11TextRenderer.java   
public void drawGlyphVector(SunGraphics2D sg2d, GlyphVector g,
                            float x, float y)
{
    FontRenderContext frc = g.getFontRenderContext();
    FontInfo info = sg2d.getGVFontInfo(g.getFont(), frc);
    switch (info.aaHint) {
    case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
        super.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         sg2d.surfaceData.aaTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
         sg2d.surfaceData.lcdTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    default:
    }
}
项目:jdk7-jdk    文件:AAShapePipe.java   
public void renderPath(SunGraphics2D sg, Shape s, BasicStroke bs) {
    boolean adjust = (bs != null &&
                      sg.strokeHint != SunHints.INTVAL_STROKE_PURE);
    boolean thin = (sg.strokeState <= sg.STROKE_THINDASHED);

    Region clip = sg.getCompClip();
    int abox[] = new int[4];
    AATileGenerator aatg =
        renderengine.getAATileGenerator(s, sg.transform, clip,
                                        bs, thin, adjust, abox);
    if (aatg == null) {
        // Nothing to render
        return;
    }

    renderTiles(sg, s, aatg, abox);
}
项目:jdk7-jdk    文件:LoopPipe.java   
public static ShapeSpanIterator getStrokeSpans(SunGraphics2D sg2d,
                                               Shape s)
{
    ShapeSpanIterator sr = new ShapeSpanIterator(false);

    try {
        sr.setOutputArea(sg2d.getCompClip());
        sr.setRule(PathIterator.WIND_NON_ZERO);

        BasicStroke bs = (BasicStroke) sg2d.stroke;
        boolean thin = (sg2d.strokeState <= sg2d.STROKE_THINDASHED);
        boolean normalize =
            (sg2d.strokeHint != SunHints.INTVAL_STROKE_PURE);

        RenderEngine.strokeTo(s,
                              sg2d.transform, bs,
                              thin, normalize, false, sr);
    } catch (Throwable t) {
        sr.dispose();
        sr = null;
        t.printStackTrace();
        throw new InternalError("Unable to Stroke shape ("+
                                t.getMessage()+")");
    }
    return sr;
}
项目:jdk7-jdk    文件:GlyphListLoopPipe.java   
protected void drawGlyphList(SunGraphics2D sg2d, GlyphList gl,
                             int aaHint) {
    switch (aaHint) {
     case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
         sg2d.loops.drawGlyphListLoop.
             DrawGlyphList(sg2d, sg2d.surfaceData, gl);
         return;
     case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         sg2d.loops.drawGlyphListAALoop.
             DrawGlyphListAA(sg2d, sg2d.surfaceData, gl);
         return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
        sg2d.loops.drawGlyphListLCDLoop.
            DrawGlyphListLCD(sg2d,sg2d.surfaceData, gl);
        return;
    }
}
项目:jdk7-jdk    文件:X11TextRenderer.java   
public void drawGlyphVector(SunGraphics2D sg2d, GlyphVector g,
                            float x, float y)
{
    FontRenderContext frc = g.getFontRenderContext();
    FontInfo info = sg2d.getGVFontInfo(g.getFont(), frc);
    switch (info.aaHint) {
    case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
        super.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         sg2d.surfaceData.aaTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
         sg2d.surfaceData.lcdTextRenderer.drawGlyphVector(sg2d, g, x, y);
        return;
    default:
    }
}
项目:openjdk-source-code-learn    文件:AAShapePipe.java   
public void renderPath(SunGraphics2D sg, Shape s, BasicStroke bs) {
    boolean adjust = (bs != null &&
                      sg.strokeHint != SunHints.INTVAL_STROKE_PURE);
    boolean thin = (sg.strokeState <= sg.STROKE_THINDASHED);

    Region clip = sg.getCompClip();
    int abox[] = new int[4];
    AATileGenerator aatg =
        renderengine.getAATileGenerator(s, sg.transform, clip,
                                        bs, thin, adjust, abox);
    if (aatg == null) {
        // Nothing to render
        return;
    }

    renderTiles(sg, s, aatg, abox);
}
项目:openjdk-source-code-learn    文件:LoopPipe.java   
public static ShapeSpanIterator getStrokeSpans(SunGraphics2D sg2d,
                                               Shape s)
{
    ShapeSpanIterator sr = new ShapeSpanIterator(false);

    try {
        sr.setOutputArea(sg2d.getCompClip());
        sr.setRule(PathIterator.WIND_NON_ZERO);

        BasicStroke bs = (BasicStroke) sg2d.stroke;
        boolean thin = (sg2d.strokeState <= sg2d.STROKE_THINDASHED);
        boolean normalize =
            (sg2d.strokeHint != SunHints.INTVAL_STROKE_PURE);

        RenderEngine.strokeTo(s,
                              sg2d.transform, bs,
                              thin, normalize, false, sr);
    } catch (Throwable t) {
        sr.dispose();
        sr = null;
        t.printStackTrace();
        throw new InternalError("Unable to Stroke shape ("+
                                t.getMessage()+")");
    }
    return sr;
}
项目:openjdk-source-code-learn    文件:GlyphListLoopPipe.java   
protected void drawGlyphList(SunGraphics2D sg2d, GlyphList gl,
                             int aaHint) {
    switch (aaHint) {
     case SunHints.INTVAL_TEXT_ANTIALIAS_OFF:
         sg2d.loops.drawGlyphListLoop.
             DrawGlyphList(sg2d, sg2d.surfaceData, gl);
         return;
     case SunHints.INTVAL_TEXT_ANTIALIAS_ON:
         sg2d.loops.drawGlyphListAALoop.
             DrawGlyphListAA(sg2d, sg2d.surfaceData, gl);
         return;
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_HRGB:
    case SunHints.INTVAL_TEXT_ANTIALIAS_LCD_VRGB:
        sg2d.loops.drawGlyphListLCDLoop.
            DrawGlyphListLCD(sg2d,sg2d.surfaceData, gl);
        return;
    }
}