Changeset 13654 in osm


Ignore:
Timestamp:
2009-02-10T22:39:13+01:00 (16 years ago)
Author:
hampelratte
Message:

added menu item to toggle the alpha channel of the wms images

Location:
applications/editors/josm/plugins/wmsplugin/src/wmsplugin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/GeorefImage.java

    r13652 r13654  
    2323public class GeorefImage implements Serializable {
    2424    public BufferedImage image = null;
    25     private BufferedImage reImg = null;
     25    private Image reImg = null;
    2626    private Dimension reImgHash = new Dimension(0, 0);
    2727    public EastNorth min, max;
     
    121121                return out_img;
    122122        }
     123   
     124    public void flushedResizedCachedInstance() {
     125        reImg = null;
     126    }
    123127}
  • applications/editors/josm/plugins/wmsplugin/src/wmsplugin/WMSLayer.java

    r13652 r13654  
    248248            boolean alphaChannel = checkbox.isSelected();
    249249            Main.pref.put("wmsplugin.alpha_channel", alphaChannel);
    250             Main.map.repaint();
     250           
     251            // clear all resized cached instances and repaint the layer
     252            for (int x = 0; x < dax; ++x) {
     253                for (int y = 0; y < day; ++y) {
     254                    GeorefImage img = images[modulo(x, dax)][modulo(y, day)];
     255                    img.flushedResizedCachedInstance();
     256                }
     257            }
     258            mv.repaint();
    251259        }
    252260    }
Note: See TracChangeset for help on using the changeset viewer.