Changeset 32914 in osm for applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/FakeMapView.java
- Timestamp:
- 2016-09-03T17:08:38+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/wms-turbo-challenge2/src/wmsturbochallenge/FakeMapView.java
r32194 r32914 43 43 ProjectionBounds parent_bounds = parent.getProjectionBounds(); 44 44 max_east_west = 45 parent_bounds.maxEast - parent_bounds.minEast; 45 parent_bounds.maxEast - parent_bounds.minEast; 46 46 } 47 47 … … 61 61 parent.zoomTo(new ProjectionBounds( 62 62 new EastNorth( 63 parent_center.east() - 64 max_east_west / 2, 65 parent_center.north()), 63 parent_center.east() - 64 max_east_west / 2, 65 parent_center.north()), 66 66 new EastNorth( 67 parent_center.east() + 68 max_east_west / 2, 69 parent_center.north()))); 67 parent_center.east() + 68 max_east_west / 2, 69 parent_center.north()))); 70 70 71 71 /* Request again because NavigatableContent adds … … 73 73 */ 74 74 ProjectionBounds new_bounds = 75 parent.getProjectionBounds(); 75 parent.getProjectionBounds(); 76 76 max_east_west = 77 new_bounds.maxEast - new_bounds.minEast; 77 new_bounds.maxEast - new_bounds.minEast; 78 78 } 79 79 … … 100 100 } 101 101 102 @Override 102 103 public ProjectionBounds getProjectionBounds() { 103 104 return view_bounds; 104 105 } 105 106 107 @Override 106 108 public Point getPoint(EastNorth p) { 107 109 double x = p.east() - view_bounds.minEast; … … 113 115 } 114 116 117 @Override 115 118 public EastNorth getEastNorth(int x, int y) { 116 119 return new EastNorth( 117 view_bounds.minEast + x * this.scale, 118 view_bounds.minNorth - y * this.scale); 120 view_bounds.minEast + x * this.scale, 121 view_bounds.minNorth - y * this.scale); 119 122 } 120 123 … … 123 126 } 124 127 128 @Override 125 129 public Graphics getGraphics() { 126 130 return graphics; 127 131 } 128 132 133 @Override 129 134 public void repaint() { 130 135 }
Note:
See TracChangeset
for help on using the changeset viewer.