Revision 6069 org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.legend/org.gvsig.raster.lib.legend.impl/src/main/java/org/gvsig/raster/lib/legend/impl/DefaultRasterLegend.java

View differences:

DefaultRasterLegend.java
34 34
/**
35 35
 * Default implementation of {@link RasterLegend}. This object can draw buffers
36 36
 * with a {@link ColorInterpretation}, {@link ColorTable} and {@link FilterList}
37
 * 
38
 * 
37
 *
38
 *
39 39
 * @author <a href="mailto:lmarques@disid.com">Lluis Marques</a>
40 40
 *
41 41
 */
......
70 70

  
71 71
    /**
72 72
     * Default {@link RasterLegend} constructor
73
     * 
73
     *
74 74
     * @param colorInterpretation
75 75
     *            Color interpretation of legend
76 76
     */
......
80 80

  
81 81
    /**
82 82
     * Default {@link RasterLegend} constructor
83
     * 
83
     *
84 84
     * @param colorTable
85 85
     *            Color table of legend
86 86
     * @param colorInterpretation
......
152 152
                        / viewPort.getImageWidth());
153 153
                double heightPixel =
154 154
                    getHeightPixel(bufferToDraw.getEnvelope(), viewPort.getEnvelope().getLength(1)
155
                        / viewPort.getImageWidth());
155
                        / viewPort.getImageHeight());
156 156

  
157 157
                bufferToDraw =
158 158
                    bufferToDraw.createInterpolated((int) Math.floor(heightPixel),
......
176 176
                        / viewPort.getImageWidth());
177 177
                heightPixel =
178 178
                    getHeightPixel(bufferToDraw.getEnvelope(), viewPort.getEnvelope().getLength(1)
179
                        / viewPort.getImageWidth());
179
                        / viewPort.getImageHeight());
180 180

  
181 181
                bufferToDraw =
182 182
                    bufferToDraw.createInterpolated((int) Math.floor(heightPixel),
......
276 276

  
277 277
        for (int i = 0; i < buffer.getRows(); i++) {
278 278
            for (int j = 0; j < buffer.getColumns(); j++) {
279

  
279
                //TODO Review this bucle
280 280
                int redBandIndex = colorInterpretation.getBand(ColorInterpretation.RED_BAND);
281 281
                int greenBandIndex = colorInterpretation.getBand(ColorInterpretation.GREEN_BAND);
282 282
                int blueBandIndex = colorInterpretation.getBand(ColorInterpretation.BLUE_BAND);

Also available in: Unified diff