| Author |
How to 'dim' the canvas?
|
James Hodgkiss
Ranch Hand
Joined: Jan 22, 2004
Posts: 401
|
|
My midlet uses a canvas where ocassionally a little popup info box may appear in the centre of the canvas. When it appears, I would like to make the surrounding area go darker. Does anyone know how I could achieve this?
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14480
|
|
The usual approach is to create a translucent window the same size as the screen, overlaying the screen and painted with a gray pattern (alternating black and clear pixels, for example. Then the actual dialog would be overlaid on to of the translucent window.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
James Hodgkiss
Ranch Hand
Joined: Jan 22, 2004
Posts: 401
|
|
So the end of my paint method is changing from: to ...it seems to work ok. Is that the way you meant? Also, rather than create one large image, is it less memory-intensive to create a smaller image and paint is several times to the canvas? Cheers, James [ November 08, 2007: Message edited by: James Hodgkiss ] [ November 08, 2007: Message edited by: James Hodgkiss ]
|
 |
 |
|
|
subject: How to 'dim' the canvas?
|
|
|