Changeset 34169 in osm for applications/editors
- Timestamp:
- 2018-04-27T00:06:11+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/layer/PicLayerAbstract.java
r34021 r34169 249 249 250 250 // Draw picture 251 g.drawImage(image, -image.getWidth(null) / 2, -image.getHeight(null) / 2, null); 251 int width = image.getWidth(null); 252 int height = image.getHeight(null); 253 try { 254 g.drawImage(image, -width / 2, -height / 2, null); 255 } catch (RuntimeException e) { 256 Logging.error(e); 257 } 252 258 253 259 // Draw additional rectangle for the active pic layer … … 255 261 g.setColor(new Color(0xFF0000)); 256 262 g.drawRect( 257 - image.getWidth(null)/ 2,258 - image.getHeight(null)/ 2,259 image.getWidth(null),260 image.getHeight(null)263 -width / 2, 264 -height / 2, 265 width, 266 height 261 267 ); 262 268 } … … 283 289 } 284 290 } else { 285 // TODO: proper logging 286 System.out.println("PicLayerAbstract::paint - general drawing error (image is null or Graphics not 2D"); 291 Logging.error("PicLayerAbstract::paint - general drawing error (image is null or Graphics not 2D"); 287 292 } 288 293 }
Note:
See TracChangeset
for help on using the changeset viewer.