Changeset 9769 in josm for trunk/test/performance/org/openstreetmap
- Timestamp:
- 2016-02-09T16:14:48+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRendererPerformanceTest.java
r9458 r9769 2 2 package org.openstreetmap.josm.data.osm.visitor.paint; 3 3 4 import java.awt.Color; 4 5 import java.awt.Graphics2D; 5 6 import java.awt.image.BufferedImage; 6 7 import java.io.File; 7 8 import java.io.FileInputStream; 9 import java.io.IOException; 8 10 import java.io.InputStream; 11 import javax.imageio.ImageIO; 9 12 10 13 import org.junit.BeforeClass; … … 13 16 import org.junit.rules.Timeout; 14 17 import org.openstreetmap.josm.JOSMFixture; 18 import org.openstreetmap.josm.Main; 15 19 import org.openstreetmap.josm.data.Bounds; 16 20 import org.openstreetmap.josm.data.osm.DataSet; … … 41 45 @BeforeClass 42 46 public static void load() throws Exception { 43 JOSMFixture.createPerformanceTestFixture().init( );44 img = new BufferedImage(IMG_WIDTH, IMG_HEIGHT, BufferedImage.TYPE_ 3BYTE_BGR);47 JOSMFixture.createPerformanceTestFixture().init(true); 48 img = new BufferedImage(IMG_WIDTH, IMG_HEIGHT, BufferedImage.TYPE_INT_ARGB); 45 49 g = (Graphics2D) img.getGraphics(); 46 nc = new NavigatableComponent(); 50 g.setClip(0, 0, IMG_WIDTH, IMG_WIDTH); 51 g.setColor(Color.BLACK); 52 g.fillRect(0, 0, IMG_WIDTH, IMG_WIDTH); 53 nc = Main.map.mapView;//new NavigatableComponent(); 47 54 nc.setBounds(0, 0, IMG_WIDTH, IMG_HEIGHT); 48 55 … … 113 120 test(200, dsCity, new Bounds(53.56, 13.295, 53.57, 13.30)); 114 121 } 122 123 /** run this manually to verify that the rendering is set up properly */ 124 private void dumpRenderedImage() throws IOException { 125 File outputfile = new File("test-neubrandenburg.png"); 126 ImageIO.write(img, "png", outputfile); 127 } 115 128 }
Note:
See TracChangeset
for help on using the changeset viewer.