Manual de Apoio 2010
Manual de Apoio 2010
Manual de Apoio 2010
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
gl. glPixelZoom (( float ) iViewport . get (2) / ( float ) img . getWidth () ,( float ) iViewport . get (3) / ( float ) img . getHeight ());//switch ( ren<strong>de</strong>rMo<strong>de</strong> ) {case Sharpen : // Sharpengl. glConvolutionFilter2D (GL2 . GL_CONVOLUTION_2D , GL2 . GL_RGB , 3, 3,GL2 . GL_LUMINANCE , GL2 . GL_FLOAT , mSharpen);gl. glEnable ( GL2 . GL_CONVOLUTION_2D );break ;case Emboss : // Embossgl. glConvolutionFilter2D (GL2 . GL_CONVOLUTION_2D , GL2 . GL_RGB , 3, 3,GL2 . GL_LUMINANCE , GL2 . GL_FLOAT , mEmboss );gl. glEnable ( GL2 . GL_CONVOLUTION_2D );break ;case Invert : // Invertfor ( int i = 0; i < 255; i ++) {invertTable . put (i * 3 + 0, ( byte ) (255 - i ));invertTable . put (i * 3 + 1, ( byte ) (255 - i ));invertTable . put (i * 3 + 2, ( byte ) (255 - i ));}gl. glColorTable (GL2 . GL_COLOR_TABLE , GL2 . GL_RGB , 256 , GL2 . GL_RGB ,GL2 . GL_UNSIGNED_BYTE , invertTable);gl. glEnable ( GL2 . GL_COLOR_TABLE );break ;case Brighten : // Brighten// Mudar para o matrix mo<strong>de</strong> Colorgl. glMatrixMo<strong>de</strong> ( GL2 . GL_COLOR );// Aumentar todas as cores em 50%gl. glScalef (2f, 2f, 2f);// Voltar ao Mo<strong>de</strong>lViewgl. glMatrixMo<strong>de</strong> ( GL2 . GL_MODELVIEW );break ;case GaussianBlur : // Gaussian Blurgl. glConvolutionFilter2D (GL2 . GL_CONVOLUTION_2D , GL2 . GL_RGB , 3, 3,GL2 . GL_LUMINANCE , GL2 . GL_FLOAT , mGaussian );gl. glEnable ( GL2 . GL_CONVOLUTION_2D );break ;}case Normal : // Normal<strong>de</strong>fault :break ;// Desenhar a Imagem com as alteracoes efectuadas (ou nao )gl. glDrawPixels (img . getWidth () , img . getHeight () ,img . getGLFormat () ,GL2 . GL_UNSIGNED_BYTE , bb );121