Namespaces
Variants
Actions

Talk:How to create an image reflection effect in Java ME

Jump to: navigation, search
{{{width}}}
15 Sep
2009
Article Review by Larry101 (20090915)

This article demonstrates how to implement a cool image reflection in Java ME. The method described is fairly easy to implement and should be easy to implement for even fairly novice Java ME developers. The basic approach consists of:
  1. Create a new image (image + reflection) the same width as the original and allowing additional height for the reflections
  2. Get the graphics object for that image using the getGraphics() method
  3. Fill the image with the background color of the canvas
  4. Copy the original image to the new image
  5. Get the red/green/blue array for the original image, line by line, using the getRGB() method.
  6. Copy the image line by line, adjusting the transparency as required to create the reflection effect.

The article demonstrates a simple, yet effective way of making Java ME applications look more graphically appealing.


{{{width}}}
17 Sep
2009
Article Review by warjan (20090917)

Article is a great how to. It shows well explained code that creates reflection for given image. Quite useful if you want to add some interesting and nice looking effects to yours app graphics. It could be used for user's avatar for example.

I think that references to related articles on the web would be useful. For example excerpt from a book Filthy Rich Clients - http://www.informit.com/articles/article.aspx?p=1013851&rll=1&rll=1&rll=1&rll=1&rll=1 It is about Java SE, but it shows the possibilities of image manipulation and effects in Java through shifting RGB values.

Well written, well focused, good how to.


 
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved