| Reply | « Previous Thread | Next Thread » |
|
Does anybody know how can i get pixels displayed on the screen
drawPixels doesn't do anything is something wrong with my code. mutImage = DirectUtils.createImage( fadeAreaWidth, fadeAreaHeight, 0 ); DirectGraphics dg = DirectUtils.getDirectGraphics(mutImage.getGraphics()); dg.drawImage(image, 0, 0, Graphics.TOP|Graphics.LEFT, 0); int[] pixels = new int[fadeAreaWidth * fadeAreaHeight]; dg.getPixels(pixels, 0, fadeAreaWidth, 0, 0, fadeAreaWidth, fadeAreaHeight, DirectGraphics.TYPE_INT_8888_ARGB); dg.drawPixels( pixels, true, 0, fadeAreaWidth, 0, 0, fadeAreaWidth, fadeAreaHeight, 0, DirectGraphics.TYPE_INT_8888_ARGB);
Last edited by romzatxxx : 2003-07-24 at 17:36.
|
|
Check current clip and try setting trancparency argument to false
|
|
P.S.
Check some pixels in resulting array. Maybe problem is not in drawPixels, but earlier |
|
I know that pixels are fine.
I tryied something like this g.setClip(0,0,fadeAreaWidth,fadeAreaHeight); dg.drawPixels( pixels, false, 0, fadeAreaWidth, 20, 20, fadeAreaWidth, fadeAreaHeight, 0, DirectGraphics.TYPE_INT_8888_ARGB); its still shooting blanks. |
|
why dosent it works, i mean you are drawing on the image you got the pixels from , so visual you wont see the effect.
have you run the array to see if it contains anything. if everything is ok then try using TYPE_INT_4444_ARGB |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|