Package org.apache.harmony.awt.gl

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


                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

                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

                    }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

                }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

            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

            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();
            if(w == width && h == height){
                blitter.blit(0, 0, srcSurf, x, y, dstSurf, w, h,
                        (AffineTransform) transform.clone(),
                        composite, bgcolor, clip);
            }else{
View Full Code Here

            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;
            }
View Full Code Here

        if(op == null) {
            drawImage(bufImage, x, y, null);
        } else if(op instanceof AffineTransformOp){
            AffineTransformOp atop = (AffineTransformOp) op;
            AffineTransform xform = atop.getTransform();
            Surface srcSurf = Surface.getImageSurface(bufImage);
            int w = srcSurf.getWidth();
            int h = srcSurf.getHeight();
            blitter.blit(0, 0, srcSurf, x, y, dstSurf, w, h,
                    (AffineTransform) transform.clone(), xform,
                    composite, null, clip);
        } else {
            bufImage = op.filter(bufImage, null);
            Surface srcSurf = Surface.getImageSurface(bufImage);
            int w = srcSurf.getWidth();
            int h = srcSurf.getHeight();
            blitter.blit(0, 0, srcSurf, x, y, dstSurf, w, h,
                    (AffineTransform) transform.clone(),
                    composite, null, clip);
        }
    }
View Full Code Here

            return drawImage(image, 0, 0, imageObserver);
        }

        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();
            AffineTransform xform = (AffineTransform) transform.clone();
            xform.concatenate(trans);
            blitter.blit(0, 0, srcSurf, 0, 0, dstSurf, w, h, xform, composite,
                    null, clip);
        }
View Full Code Here

TOP

Related Classes of org.apache.harmony.awt.gl.Surface

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.