/[classpath]/classpath/java/awt/image/DirectColorModel.java
ViewVC logotype

Diff of /classpath/java/awt/image/DirectColorModel.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10.2.4 by gnu_andrew, Tue Aug 2 20:12:16 2005 UTC revision 1.10.2.5 by gnu_andrew, Sat Sep 10 15:31:45 2005 UTC
# Line 348  public class DirectColorModel extends Pa Line 348  public class DirectColorModel extends Pa
348    {    {
349      return getComponents(getPixelFromArray(pixel), components, offset);      return getComponents(getPixelFromArray(pixel), components, offset);
350    }    }
351      
352      /**
353       * Creates a <code>WriteableRaster</code> that has a <code>SampleModel</code>
354       * that is compatible with this <code>ColorModel</code>.
355       *
356       * @param w the width of the writeable raster to create
357       * @param h the height of the writeable raster to create
358       *
359       * @throws IllegalArgumentException if <code>w</code> or <code>h</code>
360       *         is less than or equal to zero
361       */
362    public final WritableRaster createCompatibleWritableRaster(int w, int h)    public final WritableRaster createCompatibleWritableRaster(int w, int h)
363    {    {
364        // Sun also makes this check here.
365        if(w <= 0 || h <= 0)
366          throw new IllegalArgumentException("width (=" + w + ") and height (="
367                                             + h + ") must be > 0");
368    
369      SampleModel sm = createCompatibleSampleModel(w, h);      SampleModel sm = createCompatibleSampleModel(w, h);
370      Point origin = new Point(0, 0);      Point origin = new Point(0, 0);
371      return Raster.createWritableRaster(sm, origin);          return Raster.createWritableRaster(sm, origin);    
# Line 418  public class DirectColorModel extends Pa Line 433  public class DirectColorModel extends Pa
433      return super.toString();      return super.toString();
434    }    }
435  }  }
436    

Legend:
Removed from v.1.10.2.4  
changed lines
  Added in v.1.10.2.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26