Package sun.java2d

Examples of sun.java2d.SunGraphics2D


            if (sd instanceof GLXVSyncOffScreenSurfaceData) {
                GLXVSyncOffScreenSurfaceData vsd =
                    (GLXVSyncOffScreenSurfaceData)sd;
                SurfaceData bbsd = vsd.getFlipSurface();
                Graphics2D bbg =
                    new SunGraphics2D(bbsd, Color.black, Color.white, null);
                try {
                    bbg.drawImage(xBackBuffer, 0, 0, null);
                } finally {
                    bbg.dispose();
                }
            } else {
                Graphics g = peer.getGraphics();
                try {
                    g.drawImage(xBackBuffer,
View Full Code Here


            if (sd instanceof WGLVSyncOffScreenSurfaceData) {
                WGLVSyncOffScreenSurfaceData vsd =
                    (WGLVSyncOffScreenSurfaceData)sd;
                SurfaceData bbsd = vsd.getFlipSurface();
                Graphics2D bbg =
                    new SunGraphics2D(bbsd, Color.black, Color.white, null);
                try {
                    bbg.drawImage(backBuffer, 0, 0, null);
                } finally {
                    bbg.dispose();
                }
            } else {
                Graphics g = peer.getGraphics();
                try {
                    g.drawImage(backBuffer,
View Full Code Here

    {
        if (!done && sd instanceof D3DWindowSurfaceData) {
            D3DWindowSurfaceData d3dw = (D3DWindowSurfaceData)sd;
            if (!d3dw.isSurfaceLost() || validate(d3dw)) {
                trackScreenSurface(d3dw);
                return new SunGraphics2D(sd, fgColor, bgColor, font);
            }
            // could not restore the d3dw surface, use the cached gdi surface
            // instead for this graphics object; note that we do not track
            // this new gdi surface, it is only used for this graphics
            // object
View Full Code Here

            try {
                sd.restoreSurface();
                // if succeeded, first fill the surface with bg color
                // note: use the non-synch method to avoid incorrect lock order
                Color bg = sd.getPeer().getBackgroundNoSync();
                SunGraphics2D sg2d = new SunGraphics2D(sd, bg, bg, null);
                sg2d.fillRect(0, 0, sd.getBounds().width, sd.getBounds().height);
                sg2d.dispose();
                // now clean the dirty status so that we don't flip it
                // next time before it gets repainted; it is safe
                // to do without the lock because we will issue a
                // repaint anyway so we will not lose any rendering
                sd.markClean();
View Full Code Here

                }

                bisd = BufImgSurfaceData.createData(bi);
            }

            SunGraphics2D swG2d =
                new SunGraphics2D(bisd, java.awt.Color.black,
                                  java.awt.Color.white, defaultFont);

            DrawImage.renderSurfaceData(swG2d, surfaceDataSw,
                                        (java.awt.Color)null,
                                        0, 0, 0, 0, getWidth(), getHeight());
            swG2d.dispose();
            SunGraphics2D hwG2D =
                new SunGraphics2D(surfaceDataHw, java.awt.Color.black,
                                  java.awt.Color.white, defaultFont);
            DrawImage.renderSurfaceData(hwG2D, bisd,
                                        (java.awt.Color)null,
                                        0, 0, 0, 0, getWidth(), getHeight());
            hwG2D.dispose();
        }
    }
View Full Code Here

            }
            Font font = target.getFont();
            if (font == null) {
                font = defaultFont;
            }
            return new SunGraphics2D(surfaceData, fgColor, bgColor, font);
        }

        return null;
    }
View Full Code Here

        }
        Font font = afont;
        if (font == null) {
            font = defaultFont;
        }
        return new SunGraphics2D(surfData, fgColor, bgColor, font);
    }
View Full Code Here

            }
            Font font = this.font;
            if (font == null) {
                font = defaultFont;
            }
            return new SunGraphics2D(surfaceData, fgColor, bgColor, font);
        }
        return null;
    }
View Full Code Here

            revalidate();
            Image backBuffer = getBackBuffer();
            if (backBuffer == null) {
                return getGraphics();
            }
            SunGraphics2D g = (SunGraphics2D)backBuffer.getGraphics();
            g.constrain(-insets.left, -insets.top,
                        backBuffer.getWidth(null) + insets.left,
                        backBuffer.getHeight(null) + insets.top);
            return g;
        }
View Full Code Here

            revalidate();
            Image backBuffer = getBackBuffer();
            if (backBuffer == null) {
                return getGraphics();
            }
            SunGraphics2D g = (SunGraphics2D)backBuffer.getGraphics();
            g.constrain(-insets.left, -insets.top,
                        backBuffer.getWidth(null) + insets.left,
                        backBuffer.getHeight(null) + insets.top);
            return g;
        }
View Full Code Here

TOP

Related Classes of sun.java2d.SunGraphics2D

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.