Ignore:
Timestamp:
2017-12-02T21:06:00+01:00 (23 months ago)
Author:
Don-vip
Message:

fix recent Sonar issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r13129 r13186  
    19731973     * Converts an {@link Rectangle} area of {@link Image} to a {@link BufferedImage} instance.
    19741974     * @param image image to convert
    1975      * @param crop_area rectangle to crop image with
     1975     * @param cropArea rectangle to crop image with
    19761976     * @return a {@code BufferedImage} instance for the cropped area of {@code Image}.
    19771977     * @since 13127
    19781978     */
    1979     public static BufferedImage toBufferedImage(Image image, Rectangle crop_area) {
     1979    public static BufferedImage toBufferedImage(Image image, Rectangle cropArea) {
    19801980        BufferedImage buffImage = null;
    19811981        Rectangle r = new Rectangle(image.getWidth(null), image.getHeight(null));
    1982         if (r.intersection(crop_area).equals(crop_area)) {
    1983             buffImage = new BufferedImage(crop_area.width, crop_area.height, BufferedImage.TYPE_INT_ARGB);
     1982        if (r.intersection(cropArea).equals(cropArea)) {
     1983            buffImage = new BufferedImage(cropArea.width, cropArea.height, BufferedImage.TYPE_INT_ARGB);
    19841984            Graphics2D g2 = buffImage.createGraphics();
    1985             g2.drawImage(image, 0, 0, crop_area.width, crop_area.height,
    1986                 crop_area.x, crop_area.y, crop_area.x + crop_area.width, crop_area.y + crop_area.height, null);
     1985            g2.drawImage(image, 0, 0, cropArea.width, cropArea.height,
     1986                cropArea.x, cropArea.y, cropArea.x + cropArea.width, cropArea.y + cropArea.height, null);
    19871987            g2.dispose();
    19881988        }
Note: See TracChangeset for help on using the changeset viewer.