sun.java2d.loops.GraphicsPrimitive Java Examples

The following examples show how to use sun.java2d.loops.GraphicsPrimitive. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GDIBlitLoops.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Note that we do not register loops to 8-byte destinations.  This
 * is due to faster processing of dithering through our software
 * loops than through GDI StretchBlt processing.
 */
public static void register()
{
    GraphicsPrimitive[] primitives = {
        new GDIBlitLoops(SurfaceType.IntRgb,
                         GDIWindowSurfaceData.AnyGdi),
        new GDIBlitLoops(SurfaceType.Ushort555Rgb,
                         GDIWindowSurfaceData.AnyGdi,
                         0x7C00, 0x03E0, 0x001F),
        new GDIBlitLoops(SurfaceType.Ushort565Rgb,
                         GDIWindowSurfaceData.AnyGdi,
                         0xF800, 0x07E0, 0x001F),
        new GDIBlitLoops(SurfaceType.ThreeByteBgr,
                         GDIWindowSurfaceData.AnyGdi),
        new GDIBlitLoops(SurfaceType.ByteIndexedOpaque,
                         GDIWindowSurfaceData.AnyGdi,
                         true),
        new GDIBlitLoops(SurfaceType.Index8Gray,
                         GDIWindowSurfaceData.AnyGdi,
                         true),
        new GDIBlitLoops(SurfaceType.ByteGray,
                         GDIWindowSurfaceData.AnyGdi),
    };
    GraphicsPrimitiveMgr.register(primitives);
}
 
Example #2
Source File: X11Renderer.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
void XDoPath(SunGraphics2D sg2d, long pXSData, long xgc,
             int transX, int transY, Path2D.Float p2df,
             boolean isFill)
{
    GraphicsPrimitive.tracePrimitive(isFill ?
                                     "X11FillPath" :
                                     "X11DrawPath");
    super.XDoPath(sg2d, pXSData, xgc, transX, transY, p2df, isFill);
}
 
Example #3
Source File: ScaledBlit.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public GraphicsPrimitive makePrimitive(SurfaceType srctype,
                                       CompositeType comptype,
                                       SurfaceType dsttype)
{
    /*
    System.out.println("Constructing general blit for:");
    System.out.println("src:  "+srctype);
    System.out.println("comp: "+comptype);
    System.out.println("dst:  "+dsttype);
    */
    return null;
}
 
Example #4
Source File: D3DMaskFill.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
static void register() {
    GraphicsPrimitive[] primitives = {
        new D3DMaskFill(AnyColor,                  SrcOver),
        new D3DMaskFill(OpaqueColor,               SrcNoEa),
        new D3DMaskFill(GradientPaint,             SrcOver),
        new D3DMaskFill(OpaqueGradientPaint,       SrcNoEa),
        new D3DMaskFill(LinearGradientPaint,       SrcOver),
        new D3DMaskFill(OpaqueLinearGradientPaint, SrcNoEa),
        new D3DMaskFill(RadialGradientPaint,       SrcOver),
        new D3DMaskFill(OpaqueRadialGradientPaint, SrcNoEa),
        new D3DMaskFill(TexturePaint,              SrcOver),
        new D3DMaskFill(OpaqueTexturePaint,        SrcNoEa),
    };
    GraphicsPrimitiveMgr.register(primitives);
}
 
Example #5
Source File: GDIRenderer.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
void doFillRect(GDIWindowSurfaceData sData,
                Region clip, Composite comp, int color,
                int x, int y, int w, int h)
{
    GraphicsPrimitive.tracePrimitive("GDIFillRect");
    super.doFillRect(sData, clip, comp, color, x, y, w, h);
}
 
Example #6
Source File: OGLRenderer.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
protected void drawPoly(SunGraphics2D sg2d,
                        int[] xPoints, int[] yPoints,
                        int nPoints, boolean isClosed)
{
    GraphicsPrimitive.tracePrimitive("OGLDrawPoly");
    oglr.drawPoly(sg2d, xPoints, yPoints, nPoints, isClosed);
}
 
Example #7
Source File: ScaledBlit.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public GraphicsPrimitive makePrimitive(SurfaceType srctype,
                                       CompositeType comptype,
                                       SurfaceType dsttype)
{
    /*
    System.out.println("Constructing general blit for:");
    System.out.println("src:  "+srctype);
    System.out.println("comp: "+comptype);
    System.out.println("dst:  "+dsttype);
    */
    return null;
}
 
Example #8
Source File: FillSpans.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public GraphicsPrimitive makePrimitive(SurfaceType srctype,
                                       CompositeType comptype,
                                       SurfaceType dsttype)
{
    // REMIND: iterate with a FillRect primitive?
    throw new InternalError("FillSpans not implemented for "+
                            srctype+" with "+comptype);
}
 
Example #9
Source File: DrawGlyphListLCD.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
public GraphicsPrimitive makePrimitive(SurfaceType srctype,
                                       CompositeType comptype,
                                       SurfaceType dsttype) {
    /* Do not return a General loop. SunGraphics2D determines whether
     * to use LCD or standard AA text based on whether there is an
     * installed loop.
     * This can be uncommented once there is a General loop which can
     * handle one byte per colour component masks properly.
     */
    return null;
}
 
Example #10
Source File: X11Renderer.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
void XFillRoundRect(long pXSData, long xgc,
                    int x, int y, int w, int h,
                    int arcW, int arcH)
{
    GraphicsPrimitive.tracePrimitive("X11FillRoundRect");
    super.XFillRoundRect(pXSData, xgc, x, y, w, h, arcW, arcH);
}
 
Example #11
Source File: FillPath.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public GraphicsPrimitive makePrimitive(SurfaceType srctype,
                                       CompositeType comptype,
                                       SurfaceType dsttype)
{
    throw new InternalError("FillPath not implemented for "+
                            srctype+" with "+comptype);
}
 
Example #12
Source File: GDIRenderer.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
void doFillRoundRect(GDIWindowSurfaceData sData,
                     Region clip, Composite comp, int color,
                     int x, int y, int w, int h,
                     int arcW, int arcH)
{
    GraphicsPrimitive.tracePrimitive("GDIFillRoundRect");
    super.doFillRoundRect(sData, clip, comp, color,
                          x, y, w, h, arcW, arcH);
}
 
Example #13
Source File: MaskBlit.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public void setPrimitives(Blit srcconverter,
                          Blit dstconverter,
                          GraphicsPrimitive genericop,
                          Blit resconverter)
{
    this.convertsrc = srcconverter;
    this.convertdst = dstconverter;
    this.performop = (MaskBlit) genericop;
    this.convertresult = resconverter;
}
 
Example #14
Source File: GDIRenderer.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
void doDrawArc(GDIWindowSurfaceData sData,
               Region clip, Composite comp, int color,
               int x, int y, int w, int h,
               int angleStart, int angleExtent)
{
    GraphicsPrimitive.tracePrimitive("GDIDrawArc");
    super.doDrawArc(sData, clip, comp, color, x, y, w, h,
                    angleStart, angleExtent);
}
 
Example #15
Source File: GDIRenderer.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
void doDrawOval(GDIWindowSurfaceData sData,
                Region clip, Composite comp, int color,
                int x, int y, int w, int h)
{
    GraphicsPrimitive.tracePrimitive("GDIDrawOval");
    super.doDrawOval(sData, clip, comp, color, x, y, w, h);
}
 
Example #16
Source File: GDIRenderer.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
void doFillOval(GDIWindowSurfaceData sData,
                Region clip, Composite comp, int color,
                int x, int y, int w, int h)
{
    GraphicsPrimitive.tracePrimitive("GDIFillOval");
    super.doFillOval(sData, clip, comp, color, x, y, w, h);
}
 
Example #17
Source File: GDIRenderer.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
void doFillPoly(GDIWindowSurfaceData sData,
                Region clip, Composite comp, int color,
                int transx, int transy,
                int[] xpoints, int[] ypoints,
                int npoints)
{
    GraphicsPrimitive.tracePrimitive("GDIFillPoly");
    super.doFillPoly(sData, clip, comp, color, transx, transy,
                     xpoints, ypoints, npoints);
}
 
Example #18
Source File: FillSpans.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public GraphicsPrimitive makePrimitive(SurfaceType srctype,
                                       CompositeType comptype,
                                       SurfaceType dsttype)
{
    // REMIND: iterate with a FillRect primitive?
    throw new InternalError("FillSpans not implemented for "+
                            srctype+" with "+comptype);
}
 
Example #19
Source File: GDIRenderer.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
void doFillPoly(GDIWindowSurfaceData sData,
                Region clip, Composite comp, int color,
                int transx, int transy,
                int[] xpoints, int[] ypoints,
                int npoints)
{
    GraphicsPrimitive.tracePrimitive("GDIFillPoly");
    super.doFillPoly(sData, clip, comp, color, transx, transy,
                     xpoints, ypoints, npoints);
}
 
Example #20
Source File: GDIRenderer.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
void doFillOval(GDIWindowSurfaceData sData,
                Region clip, Composite comp, int color,
                int x, int y, int w, int h)
{
    GraphicsPrimitive.tracePrimitive("GDIFillOval");
    super.doFillOval(sData, clip, comp, color, x, y, w, h);
}
 
Example #21
Source File: OGLRenderer.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public void drawParallelogram(SunGraphics2D sg2d,
                              double ux1, double uy1,
                              double ux2, double uy2,
                              double x, double y,
                              double dx1, double dy1,
                              double dx2, double dy2,
                              double lw1, double lw2)
{
    GraphicsPrimitive.tracePrimitive("OGLDrawParallelogram");
    oglr.drawParallelogram(sg2d,
                           ux1, uy1, ux2, uy2,
                           x, y, dx1, dy1, dx2, dy2, lw1, lw2);
}
 
Example #22
Source File: GDIRenderer.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
public void devCopyArea(GDIWindowSurfaceData sData,
                        int srcx, int srcy,
                        int dx, int dy,
                        int w, int h)
{
    GraphicsPrimitive.tracePrimitive("GDICopyArea");
    super.devCopyArea(sData, srcx, srcy, dx, dy, w, h);
}
 
Example #23
Source File: GDIRenderer.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
void doDrawPoly(GDIWindowSurfaceData sData,
                Region clip, Composite comp, int color,
                int transx, int transy,
                int[] xpoints, int[] ypoints,
                int npoints, boolean isclosed)
{
    GraphicsPrimitive.tracePrimitive("GDIDrawPoly");
    super.doDrawPoly(sData, clip, comp, color, transx, transy,
                     xpoints, ypoints, npoints, isclosed);
}
 
Example #24
Source File: OGLRenderer.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public void fillParallelogram(SunGraphics2D sg2d,
                              double ux1, double uy1,
                              double ux2, double uy2,
                              double x, double y,
                              double dx1, double dy1,
                              double dx2, double dy2)
{
    GraphicsPrimitive.tracePrimitive("OGLFillParallelogram");
    oglr.fillParallelogram(sg2d,
                           ux1, uy1, ux2, uy2,
                           x, y, dx1, dy1, dx2, dy2);
}
 
Example #25
Source File: OGLMaskFill.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
static void register() {
    GraphicsPrimitive[] primitives = {
        new OGLMaskFill(AnyColor,                  SrcOver),
        new OGLMaskFill(OpaqueColor,               SrcNoEa),
        new OGLMaskFill(GradientPaint,             SrcOver),
        new OGLMaskFill(OpaqueGradientPaint,       SrcNoEa),
        new OGLMaskFill(LinearGradientPaint,       SrcOver),
        new OGLMaskFill(OpaqueLinearGradientPaint, SrcNoEa),
        new OGLMaskFill(RadialGradientPaint,       SrcOver),
        new OGLMaskFill(OpaqueRadialGradientPaint, SrcNoEa),
        new OGLMaskFill(TexturePaint,              SrcOver),
        new OGLMaskFill(OpaqueTexturePaint,        SrcNoEa),
    };
    GraphicsPrimitiveMgr.register(primitives);
}
 
Example #26
Source File: DrawPath.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
public GraphicsPrimitive makePrimitive(SurfaceType srctype,
                                       CompositeType comptype,
                                       SurfaceType dsttype)
{
    throw new InternalError("DrawPath not implemented for "+
                            srctype+" with "+comptype);
}
 
Example #27
Source File: GDIRenderer.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
void doFillRect(GDIWindowSurfaceData sData,
                Region clip, Composite comp, int color,
                int x, int y, int w, int h)
{
    GraphicsPrimitive.tracePrimitive("GDIFillRect");
    super.doFillRect(sData, clip, comp, color, x, y, w, h);
}
 
Example #28
Source File: DrawPolygons.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public GraphicsPrimitive makePrimitive(SurfaceType srctype,
                                       CompositeType comptype,
                                       SurfaceType dsttype)
{
    // REMIND: use FillSpans or converter object?
    throw new InternalError("DrawPolygons not implemented for "+
                            srctype+" with "+comptype);
}
 
Example #29
Source File: DrawPath.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public GraphicsPrimitive makePrimitive(SurfaceType srctype,
                                       CompositeType comptype,
                                       SurfaceType dsttype)
{
    throw new InternalError("DrawPath not implemented for "+
                            srctype+" with "+comptype);
}
 
Example #30
Source File: GDIRenderer.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
void doDrawRect(GDIWindowSurfaceData sData,
                Region clip, Composite comp, int color,
                int x, int y, int w, int h)
{
    GraphicsPrimitive.tracePrimitive("GDIDrawRect");
    super.doDrawRect(sData, clip, comp, color, x, y, w, h);
}