Hi Francesa,

I'm copying this to the user list and I've edited the subject. I hope that's OK.

Please see my reply below your message...

> Hi Micheal,
>
> I have again a question for you. I'm following the example you suggested
> me (FlyingSaucer) and I have the following problem: in the method
> paintSprite, I get a NullPointerException when I call getBaseImage()
>
> private void paintSprite(Graphics2D gr2D) {
>        Rectangle bounds = getSpriteScreenPos();
>        spriteBackground = getBaseImage().getData(bounds);
>        gr2D.drawImage(SPRITE_IMAGE, bounds.x, bounds.y, null);
>    }
>
> have you any idea on why this happens?
> Thank you again for your help
> francesca

Is it possible that you are calling the getBaseImage method before
your map layers have been displayed ?  In the current code (version
2.7.x and 8.x) the base image is only created by the map pane when it
needs to draw some features.

Michael

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to