Changeset 24955 in osm for applications/editors/josm


Ignore:
Timestamp:
2011-01-03T11:16:46+01:00 (14 years ago)
Author:
clementm
Message:

IMPROVEMENT: Display the current downloading box (orange) even if download queue is empty.
BUGFIX: Enables loading old Cache format and adding new images to them (Loading a cache in format 3 will continue to be stored as format 3).

Location:
applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/GeorefImage.java

    r24934 r24955  
    4646    public GeorefImage(BufferedImage img, EastNorth min, EastNorth max) {
    4747        image = img;
    48 
     48 
    4949        this.min = min;
    5050        this.max = max;
     
    141141            }
    142142        }
    143         g.drawImage(image, minPt.x, maxPt.y, maxPt.x, minPt.y, // dest
    144                 0, 0, image.getWidth(), image.getHeight(), // src
    145                 null);
     143            g.drawImage(image, minPt.x, maxPt.y, maxPt.x, minPt.y, // dest
     144                        0, 0, image.getWidth(), image.getHeight(), // src
     145                        null);
    146146        if (backgroundTransparent && transparency < 1.0f)
    147147            g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.0f));
     
    237237        out.writeDouble(orgCroppedRaster[2].getX()); out.writeDouble(orgCroppedRaster[2].getY());
    238238        out.writeDouble(orgCroppedRaster[3].getX()); out.writeDouble(orgCroppedRaster[3].getY());
    239         out.writeInt(imageOriginalHeight);
    240         out.writeInt(imageOriginalWidth);
     239        // Write image as a format 3 if cache was loaded with this format to avoid incompatibilities.
     240        if (WMSLayer.currentFormat >= 4) {
     241            out.writeInt(imageOriginalHeight);
     242            out.writeInt(imageOriginalWidth);
     243        }
    241244        ImageIO.write(image, "png", ImageIO.createImageOutputStream(out));
    242245    }
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/WMSLayer.java

    r24934 r24955  
    231231            paintCrosspieces(g, mv);
    232232        }
    233         if (grabThread.getImagesToGrabSize() > 0) {
     233        //        if (grabThread.getImagesToGrabSize() > 0) {
    234234            grabThread.paintBoxesToGrab(g, mv);
    235         }
     235            //        }
    236236        if (this.adjustModeEnabled) {
    237237            WMSAdjustAction.paintAdjustFrames(g, mv);
     
    379379     */
    380380    public void write(ObjectOutputStream oos) throws IOException {
     381        // Set currentFormat to the serializeFormatVersion
     382        currentFormat = this.serializeFormatVersion;
    381383        oos.writeInt(this.serializeFormatVersion);
    382384        oos.writeObject(this.location);    // String
Note: See TracChangeset for help on using the changeset viewer.