Ignore:
Timestamp:
2009-11-14T20:01:49+01:00 (15 years ago)
Author:
jttt
Message:

Updated to new MapViewPaintable.paint arguments

Location:
applications/editors/josm/plugins/piclayer
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/piclayer/build.xml

    r18505 r18597  
    8181                <attribute name="Plugin-Date" value="${version.entry.commit.date}"/>
    8282                <attribute name="Plugin-Description" value="This plugin allows to display any picture as a background in the editor and align it with the map."/>
    83                 <attribute name="Plugin-Mainversion" value="2393"/>
     83                <attribute name="Plugin-Mainversion" value="2450"/>
    8484                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    8585            </manifest>
  • applications/editors/josm/plugins/piclayer/src/org/openstreetmap/josm/plugins/piclayer/PicLayerAbstract.java

    r17327 r18597  
    3737import javax.swing.JSeparator;
    3838
     39import org.openstreetmap.josm.Main;
     40import org.openstreetmap.josm.data.Bounds;
    3941import org.openstreetmap.josm.data.coor.EastNorth;
    4042import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor;
    41 import org.openstreetmap.josm.Main;
    4243import org.openstreetmap.josm.gui.MapView;
    4344import org.openstreetmap.josm.gui.layer.Layer;
     
    7071    // Layer icon
    7172    private Icon m_layericon = null;
    72    
     73
    7374    // Keys for saving in Properties
    7475    private final String INITIAL_POS_X = "INITIAL_POS_X";
     
    186187
    187188    @Override
    188     public void paint(Graphics arg0, MapView arg1) {
    189 
    190         if ( m_image != null && arg0 instanceof Graphics2D) {
     189    public void paint(Graphics2D g2, MapView mv, Bounds bounds) {
     190
     191        if ( m_image != null && g2 instanceof Graphics2D) {
    191192
    192193            // Position image at the right graphical place
     
    200201
    201202            // Let's use Graphics 2D
    202             Graphics2D g = (Graphics2D)arg0.create();
     203            Graphics2D g = (Graphics2D)g2.create();
    203204            // Move
    204205            g.translate( pic_offset_x, pic_offset_y );
     
    294295        props.put(ANGLE, "" + m_angle);
    295296    }
    296    
     297
    297298    /**
    298299     * Loads calibration data from properties structure
Note: See TracChangeset for help on using the changeset viewer.