Examples of Surface


Examples of org.apache.harmony.awt.gl.Surface

        return h;
    }

    @Override
    public BufferedImage getSnapshot() {
        Surface s = getImageSurface();
        return new BufferedImage(s.getColorModel(), s.getRaster(), true, null);
    }
View Full Code Here

Examples of org.apache.harmony.awt.gl.Surface

        if (r.getX() != 0 || r.getY() != 0) {
            gl.glPixelStoref(GLDefs.GL_UNPACK_SKIP_PIXELS, (float)r.getX());
            gl.glPixelStoref(GLDefs.GL_UNPACK_SKIP_ROWS, (float)r.getY());
        }
        */
        Surface srcSurf = Surface.getImageSurface(p.getImage());

        int width = (int) r.getWidth();
        int height = (int) r.getHeight();

        OGLBlitter oglBlitter = (OGLBlitter) blitter;

        OGLBlitter.OGLTextureParams tp = oglBlitter.blitImg2OGLTexCached(
                srcSurf,
                srcSurf.getWidth(), srcSurf.getHeight(),
                true
        );

        gl.glTexParameteri(GLDefs.GL_TEXTURE_2D, GLDefs.GL_TEXTURE_WRAP_S, GLDefs.GL_REPEAT);
        gl.glTexParameteri(GLDefs.GL_TEXTURE_2D, GLDefs.GL_TEXTURE_WRAP_T, GLDefs.GL_REPEAT);
View Full Code Here

Examples of org.apache.harmony.awt.gl.Surface

                Math.round(-newGlyph.bmp_top  / texSize),
                glyph.getPointWidth(),
                glyph.getPointHeight()
                );       
       
        Surface sur = Surface.getImageSurface(bim);
       
        OGLBlitter.OGLTextureParams tp =  OGLBlitter.getInstance().blitImg2OGLTexCached(
                sur,
                bim.getWidth(),
                bim.getHeight(),
View Full Code Here

Examples of org.apache.harmony.awt.gl.Surface

                Math.round(-newGlyph.bmp_top  / texSize),
                glyph.getPointWidth(),
                glyph.getPointHeight()
                );       
       
        Surface sur = Surface.getImageSurface(bim);
       
        OGLBlitter.OGLTextureParams tp =  OGLBlitter.getInstance().blitImg2OGLTexCached(
                sur,
                bim.getWidth(),
                bim.getHeight(),
View Full Code Here

Examples of org.apache.harmony.awt.gl.Surface

                    }else{
                        int w = srcSurf.getWidth();
                        int h = srcSurf.getHeight();
                        BufferedImage tmp = new BufferedImage(w, h,
                                BufferedImage.TYPE_INT_RGB);
                        Surface tmpSurf = Surface.getImageSurface(tmp);
                        blit(0, 0, srcSurf, 0, 0, tmpSurf,
                                w, h, AlphaComposite.SrcOver, null, null);
                        JavaBlitter.inst.blit(srcX, srcY, tmpSurf, dstX, dstY,
                                dstSurf, width, height,
                                sysxform, comp, bgcolor, clip);
View Full Code Here

Examples of org.apache.harmony.awt.gl.Surface

                }else{
                    int w = srcSurf.getWidth();
                    int h = srcSurf.getHeight();
                    BufferedImage tmp = new BufferedImage(w, h,
                            BufferedImage.TYPE_INT_RGB);
                    Surface tmpSurf = Surface.getImageSurface(tmp);
                    long tmpSurfStruct = tmpSurf.getSurfaceDataPtr();
                    Object tmpData = tmpSurf.getData();
                    int tmpClip[] = new int[]{5, 0, 0, srcSurf.getWidth(),
                            srcSurf.getHeight()};
                   
                    blt(0, 0, srcSurfStruct, srcData, 0, 0,
                            tmpSurfStruct, tmpData, w, h,
View Full Code Here

Examples of org.apache.harmony.awt.gl.Surface

            return true;
        }

        boolean done = false;
        boolean somebits = false;
        Surface srcSurf = null;
        if(image instanceof OffscreenImage){
            OffscreenImage oi = (OffscreenImage) image;
            if((oi.getState() & ImageObserver.ERROR) != 0) {
                return false;
            }
            done = oi.prepareImage(imageObserver);
            somebits = (oi.getState() & ImageObserver.SOMEBITS) != 0;
            srcSurf = oi.getImageSurface();
        }else{
            done = true;
            srcSurf = Surface.getImageSurface(image);
        }

        if(done || somebits) {
            int w = srcSurf.getWidth();
            int h = srcSurf.getHeight();
            blitter.blit(0, 0, srcSurf, x, y, dstSurf, w, h, (AffineTransform) transform.clone(),
                    composite, bgcolor, clip);
        }
        return done;
    }
View Full Code Here

Examples of org.jnode.driver.video.Surface

            }
            if (tk.getFontManager() == null) {
                System.err.println("FontManager is null");
                return;
            }
            tk.getFontManager().drawText(new Surface() {
                public void copyArea(int x, int y, int width, int height, int dx, int dy) {
                    org.jnode.vm.Unsafe.debug("DTP copyArea()\n");
                    g2d.copyArea(x, y, width, height, dx, dy);
                }
View Full Code Here

Examples of org.jnode.driver.video.Surface

        log.debug("refCount.dec=" + rc);
        if ((rc == 0) || forceClose) {
            onClose();
            final KeyboardHandler keyboardHandler = this.keyboardHandler;
            final MouseHandler mouseHandler = this.mouseHandler;
            final Surface graphics = this.graphics;

            if (keyboardHandler != null) {
                keyboardHandler.close();
            }
            if (mouseHandler != null) {
                mouseHandler.close();
            }
            if (graphics != null) {
                graphics.close();
            }

            final FrameBufferAPI savedApi = this.api;
            this.api = null;
            this.graphics = null;
View Full Code Here

Examples of org.jnode.driver.video.Surface

        Dimension ss = getScreenSize();
        backBuffer = new BufferedImage((int) ss.getWidth(), (int) ss.getHeight(), BufferedImage.TYPE_INT_ARGB);

        final KeyboardHandler keyboardHandler = this.keyboardHandler;
        final MouseHandler mouseHandler = this.mouseHandler;
        final Surface graphics = this.graphics;
        this.graphics = new BufferedImageSurface(backBuffer);

        if (keyboardHandler != null) {
            keyboardHandler.close();
        }
        if (mouseHandler != null) {
            mouseHandler.close();
        }

        if (graphics != null) {
            graphics.close();
        }
        this.keyboardHandler = null;
        this.mouseHandler = null;

        synchronized (initCloseLock) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.