Michael, > OK - I've just run a test here where a small DiskMemImage is created > having 4 tiles, using a DiskMemTileCache that can only hold a single > tile in memory. The test gets a Graphics object for the image and > draws into each tile in turn It then draws into the tiles again, in > the same order as before. This means that each tile will have been > flushed to disk with the result of the first draw, then restored to > memory to be drawn into again. > > The result (just displayed on screen by the test at the moment) looks > fine to me. So it seems that a tile remains writable after being > disk-cached. I actually thought it would be OK since both DiskMemImage > and DiskMemTileCache received a lot of testing by several users when > first released. interesting.
I did some debuggig via eclipse, for one of the labels that don't get rendered. the code does get until DiskMemImage.doDraw(), and it gets as far as method.invoke(), but IMHO it seems that a wrong tile is selected for drawing. here are some values from the debugger at the time of method.invoke() in DiskMemImage.doDraw() (line 809): transform: AffineTransform[[1.0, 0.0, 2526.9999999958536], [0.0, 1.0, 608.00000000018]] usrClip.floatCoords: [0.0, 0.0, 2666.0, 0.0, 2666.0, 1751.0, 0.0, 1751.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] tileX: 0 tileY: 0 minTileX: 0 maxTileX: 0 minTileY: 0 maxTileY: 0 targetImage: PlanarImage[minX=0 minY=0 width=2666 height=1751 tileGridXOffset=0 tileGridYOffset=0 tileWidth=1024 tileHeight=1024 sampleModel=ComponentSampleModelJAI: dataType=0 numBands=3 width=1024 height=1024 bandOffsets=[ 0 0 0 ] colorModel=ColorModel: #pixelBits = 24 numComponents = 3 color space = java.awt.color.ICC_ColorSpace@6f65011d transparency = 1 has alpha = false isAlphaPre = false] so, it seems to me that while the position of the text to be drawn is within the image bounds (image bounds being 2666x1751, drawing transformation coordinates being 2527, 608), but the selected tile is wrong (tileX: 0, tileY: 0, where each tile is 1024x1024 in size - this should be tileX:2, tileY:0 instead) it seems, looking at the way maxTileX and maxTileY are calculated, the calculation goes astray on the bounds parameter of doDraw(). they are calculated in DiskMemImageGraphics.drawGlyphVector(), where g.getVisualBounds() returns: java.awt.geom.Rectangle2D$Float[x=0.59375,y=-5.828125,w=29.140625,h=5.921875] and the calculated bounds is: java.awt.geom.Rectangle2D$Float[x=-0.40625,y=-6.828125,w=31.140625,h=7.921875] while this seems a valid bound for the label if it would be drawn at 0, 0, it seems these bounds are not offset for the intended draw location (2527, 608) Akos ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_123012 _______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users