Revision 29313
branches/v2_0_0_prep/libraries/libFMap_mapcontext/src-test/org/gvsig/fmap/mapcontext/rendering/TestCartographicSupportForSymbol.java | ||
---|---|---|
47 | 47 |
|
48 | 48 |
import junit.framework.TestCase; |
49 | 49 |
|
50 |
import org.gvsig.compat.CompatLocator; |
|
50 | 51 |
import org.gvsig.fmap.AllTests; |
51 | 52 |
import org.gvsig.fmap.geom.Geometry; |
52 | 53 |
import org.gvsig.fmap.geom.GeometryLocator; |
... | ... | |
326 | 327 |
markerSym.setSize(size); |
327 | 328 |
csSym.toCartographicSize( |
328 | 329 |
viewPort, |
329 |
MapContext.getScreenDPI(),
|
|
330 |
CompatLocator.getGraphicsUtils().getScreenDPI(),
|
|
330 | 331 |
geomManager.createPoint( |
331 | 332 |
viewPort.getAdjustedExtent().getCenter(0), |
332 | 333 |
viewPort.getAdjustedExtent().getCenter(1), |
... | ... | |
345 | 346 |
lineSym.setLineWidth(size); |
346 | 347 |
csSym.toCartographicSize( |
347 | 348 |
viewPort, |
348 |
MapContext.getScreenDPI(),
|
|
349 |
CompatLocator.getGraphicsUtils().getScreenDPI(),
|
|
349 | 350 |
geomManager.createPoint( |
350 | 351 |
viewPort.getAdjustedExtent().getCenter(0), |
351 | 352 |
viewPort.getAdjustedExtent().getCenter(1), |
... | ... | |
370 | 371 |
|
371 | 372 |
csSym.toCartographicSize( |
372 | 373 |
viewPort, |
373 |
MapContext.getScreenDPI(),
|
|
374 |
CompatLocator.getGraphicsUtils().getScreenDPI(),
|
|
374 | 375 |
geomManager.createPoint( |
375 | 376 |
viewPort.getAdjustedExtent().getCenter(0), |
376 | 377 |
viewPort.getAdjustedExtent().getCenter(1), |
... | ... | |
429 | 430 |
markerSym.setSize(size); |
430 | 431 |
csSym.toCartographicSize( |
431 | 432 |
viewPort, |
432 |
MapContext.getScreenDPI(),
|
|
433 |
CompatLocator.getGraphicsUtils().getScreenDPI(),
|
|
433 | 434 |
geomManager.createPoint( |
434 | 435 |
viewPort.getAdjustedExtent().getCenter(0), |
435 | 436 |
viewPort.getAdjustedExtent().getCenter(1), |
... | ... | |
448 | 449 |
lineSym.setLineWidth(size); |
449 | 450 |
csSym.toCartographicSize( |
450 | 451 |
viewPort, |
451 |
MapContext.getScreenDPI(),
|
|
452 |
CompatLocator.getGraphicsUtils().getScreenDPI(),
|
|
452 | 453 |
geomManager.createPoint( |
453 | 454 |
viewPort.getAdjustedExtent().getCenter(0), |
454 | 455 |
viewPort.getAdjustedExtent().getCenter(1), |
... | ... | |
473 | 474 |
|
474 | 475 |
csSym.toCartographicSize( |
475 | 476 |
viewPort, |
476 |
MapContext.getScreenDPI(),
|
|
477 |
CompatLocator.getGraphicsUtils().getScreenDPI(),
|
|
477 | 478 |
geomManager.createPoint( |
478 | 479 |
viewPort.getAdjustedExtent().getCenter(0), |
479 | 480 |
viewPort.getAdjustedExtent().getCenter(1), |
... | ... | |
531 | 532 |
markerSym.setSize(size*MapContext.CHANGEM[mapUnit]); // 30m*1000 = 30 km |
532 | 533 |
csSym.toCartographicSize( |
533 | 534 |
viewPort, |
534 |
MapContext.getScreenDPI(),
|
|
535 |
CompatLocator.getGraphicsUtils().getScreenDPI(),
|
|
535 | 536 |
geomManager.createPoint( |
536 | 537 |
viewPort.getAdjustedExtent().getCenter(0), |
537 | 538 |
viewPort.getAdjustedExtent().getCenter(1), |
... | ... | |
550 | 551 |
lineSym.setLineWidth(size*MapContext.CHANGEM[mapUnit]); // 30m*1000 = 30 km |
551 | 552 |
csSym.toCartographicSize( |
552 | 553 |
viewPort, |
553 |
MapContext.getScreenDPI(),
|
|
554 |
CompatLocator.getGraphicsUtils().getScreenDPI(),
|
|
554 | 555 |
geomManager.createPoint( |
555 | 556 |
viewPort.getAdjustedExtent().getCenter(0), |
556 | 557 |
viewPort.getAdjustedExtent().getCenter(1), |
... | ... | |
575 | 576 |
|
576 | 577 |
csSym.toCartographicSize( |
577 | 578 |
viewPort, |
578 |
MapContext.getScreenDPI(),
|
|
579 |
CompatLocator.getGraphicsUtils().getScreenDPI(),
|
|
579 | 580 |
geomManager.createPoint( |
580 | 581 |
viewPort.getAdjustedExtent().getCenter(0), |
581 | 582 |
viewPort.getAdjustedExtent().getCenter(1), |
branches/v2_0_0_prep/libraries/libFMap_mapcontext/src-test/org/gvsig/fmap/mapcontext/rendering/symbol/TestDrawMarkers.java | ||
---|---|---|
52 | 52 |
|
53 | 53 |
import junit.framework.TestCase; |
54 | 54 |
|
55 |
import org.gvsig.compat.CompatLocator; |
|
55 | 56 |
import org.gvsig.fmap.geom.GeometryLocator; |
56 | 57 |
import org.gvsig.fmap.geom.GeometryManager; |
57 | 58 |
import org.gvsig.fmap.geom.Geometry.SUBTYPES; |
... | ... | |
115 | 116 |
for (int i = 0; i < symbols.length; i++) { |
116 | 117 |
for (int j = 0; j < sizes.length; j++) { |
117 | 118 |
// new blank buffered image |
118 |
BufferedImage bi = new BufferedImage(sz.width, sz.height, BufferedImage.TYPE_INT_ARGB);
|
|
119 |
BufferedImage bi = CompatLocator.getGraphicsUtils().createBufferedImage(sz.width, sz.height, BufferedImage.TYPE_INT_ARGB);
|
|
119 | 120 |
|
120 | 121 |
// the graphics for the image, so we can draw onto the buffered image |
121 | 122 |
Graphics2D g = bi.createGraphics(); |
... | ... | |
155 | 156 |
for (int i = 0; i < symbols.length; i++) { |
156 | 157 |
for (int j = 0; j < sizes.length; j++) { |
157 | 158 |
// new blank buffered image |
158 |
BufferedImage bi = new BufferedImage(sz.width, sz.height, BufferedImage.TYPE_INT_ARGB);
|
|
159 |
BufferedImage bi = CompatLocator.getGraphicsUtils().createBufferedImage(sz.width, sz.height, BufferedImage.TYPE_INT_ARGB);
|
|
159 | 160 |
|
161 |
|
|
160 | 162 |
// the graphics for the image, so we can draw onto the buffered image |
161 | 163 |
Graphics2D g = bi.createGraphics(); |
162 | 164 |
|
branches/v2_0_0_prep/libraries/libFMap_mapcontext/src-test/org/gvsig/fmap/mapcontext/rendering/symbol/TestDrawFills.java | ||
---|---|---|
53 | 53 |
|
54 | 54 |
import junit.framework.TestCase; |
55 | 55 |
|
56 |
import org.gvsig.compat.CompatLocator; |
|
56 | 57 |
import org.gvsig.fmap.AllTests; |
57 | 58 |
import org.gvsig.fmap.geom.Geometry; |
58 | 59 |
import org.gvsig.fmap.geom.GeometryLocator; |
... | ... | |
166 | 167 |
|
167 | 168 |
for (int s = 0; s < sizes.length; s++) { |
168 | 169 |
|
169 |
BufferedImage bi = new BufferedImage(sz.width,sz.height, BufferedImage.TYPE_INT_ARGB);
|
|
170 |
BufferedImage bi = CompatLocator.getGraphicsUtils().createBufferedImage(sz.width,sz.height, BufferedImage.TYPE_INT_ARGB);
|
|
170 | 171 |
// the graphics for the image, so we can draw onto the buffered image |
171 | 172 |
Graphics2D g = bi.createGraphics(); |
172 | 173 |
|
branches/v2_0_0_prep/libraries/libFMap_mapcontext/src-test/org/gvsig/fmap/mapcontext/rendering/symbol/TestDrawLines.java | ||
---|---|---|
50 | 50 |
|
51 | 51 |
import junit.framework.TestCase; |
52 | 52 |
|
53 |
import org.gvsig.compat.CompatLocator; |
|
53 | 54 |
import org.gvsig.fmap.geom.GeometryLocator; |
54 | 55 |
import org.gvsig.fmap.geom.GeometryManager; |
55 | 56 |
import org.gvsig.fmap.geom.Geometry.SUBTYPES; |
... | ... | |
127 | 128 |
for (int i = 0; i < symbols.length; i++) { |
128 | 129 |
for (int j = 0; j < sizes.length; j++) { |
129 | 130 |
// new blank buffered image |
130 |
BufferedImage bi = new BufferedImage(sz.width, sz.height, BufferedImage.TYPE_INT_ARGB); |
|
131 |
|
|
132 |
BufferedImage bi = CompatLocator.getGraphicsUtils().createBufferedImage(sz.width, sz.height, BufferedImage.TYPE_INT_ARGB); |
|
131 | 133 |
|
132 | 134 |
// the graphics for the image, so we can draw onto the buffered image |
133 | 135 |
Graphics2D g = bi.createGraphics(); |
Also available in: Unified diff