Package org.apache.harmony.awt.gl

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


            wr = (WritableRaster) r;
        }else{
            wr = r.createCompatibleWritableRaster();
            wr.setRect(r);
        }
        Surface srcSurf = new ImageSurface(pc.getColorModel(), wr);
        blitter.blit(0, 0, srcSurf, x, y, dstSurf, w, h,
                composite, null, mra);
        srcSurf.dispose();
    }
View Full Code Here


            if(srcSurf.getTransparency() == Transparency.OPAQUE){
                bi = new BufferedImage(srcSurf.getWidth(), srcSurf.getHeight(), BufferedImage.TYPE_INT_RGB);
            }else{
                bi = new BufferedImage(srcSurf.getWidth(), srcSurf.getHeight(), BufferedImage.TYPE_INT_ARGB);
            }
            Surface tmpSurf = AwtImageBackdoorAccessor.getInstance().getImageSurface(bi);
            JavaBlitter.getInstance().blit(0, 0, srcSurf, 0, 0, tmpSurf,
                    srcSurf.getWidth(), srcSurf.getHeight(),
                    AlphaComposite.Src, null, null);
            blit(srcX, srcY, tmpSurf, dstX, dstY, dstSurf,
                    width, height, sysxform, comp, bgcolor, clip);
View Full Code Here

        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

                    }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 h;
    }

    @Override
    public BufferedImage getSnapshot() {
        Surface s = getImageSurface();
        return new BufferedImage(s.getColorModel(), s.getRaster(), true, null);
    }
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

            if(srcSurf.getTransparency() == Transparency.OPAQUE){
                bi = new BufferedImage(srcSurf.getWidth(), srcSurf.getHeight(), BufferedImage.TYPE_INT_RGB);
            }else{
                bi = new BufferedImage(srcSurf.getWidth(), srcSurf.getHeight(), BufferedImage.TYPE_INT_ARGB);
            }
            Surface tmpSurf = AwtImageBackdoorAccessor.getInstance().getImageSurface(bi);
            JavaBlitter.getInstance().blit(0, 0, srcSurf, 0, 0, tmpSurf,
                    srcSurf.getWidth(), srcSurf.getHeight(),
                    AlphaComposite.Src, null, null);
            blit(srcX, srcY, tmpSurf, dstX, dstY, dstSurf,
                    width, height, sysxform, comp, bgcolor, 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.