Hello, Aldo. As you say, the Graphics2D class in CDC knows nothing about affine transforms, so you always have to provide 'final' coordinates, that is, screen coordinates.
The Image class has a resample method and of course there are ways to clip an image, so all you have to do is clipping and resizing the image until you have the final image, and then paste it in the correct coordinates on the screen, that's what the WKRasterDriver does. These images (we're talking about JPG, PNG and GIF images; the ECW driver is totally different) are very memory-consuming and can only be loaded if the have less than 400,000 pixels. If we tried to open larger images, the virtual machine itself would be at risk. We tried to do the clipping and resampling in such a way that we never need to instantiate a large image, but maybe this is not always possible. Can you send us the log files under \gvSIGMobile\log\ or even the image itself? Regards, Juan Lucas Domínguez Rubio --- Prodevelop SL, Valencia (España) 0° 22' 49.62" W, 39° 28' 25.45" N Tlf.: 96.351.06.12 -- Fax: 96.351.09.68 http://www.prodevelop.es --- -----Mensaje original----- De: [email protected] en nombre de Aldo Stracquadanio Enviado el: mar 15/09/2009 18:32 Para: [email protected] Asunto: [Gvsig_english] Code Question - raster layers Hi everybody, I'm reading the phoneME Mobile source code, but I can't understand something about the WKFRasterDriver: if there is no support for AffineTransform in CDC, how do you obtain a "shear" effect using only scaling-translation operations? I can't figure it out and, as well, the raster layer visualization is not working at all on my installation: in my opinion there is some problem with the asynchronus behaviour of the Image.getScaledInstance method since I get a "Cannot resample (down)". Can someone help me understanding? Thank's all, Aldo Stracquadanio. _______________________________________________ Gvsig_internacional mailing list [email protected] http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
_______________________________________________ Gvsig_internacional mailing list [email protected] http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional
