jdk/src/java.desktop/share/classes/java/awt/image/Raster.java
changeset 32865 f9cb6e427f9e
parent 26749 b6598aa90114
child 35667 ed476aba94de
equal deleted inserted replaced
32864:2a338536e642 32865:f9cb6e427f9e
   165     protected int numDataElements;
   165     protected int numDataElements;
   166 
   166 
   167     /** The parent of this Raster, or null. */
   167     /** The parent of this Raster, or null. */
   168     protected Raster parent;
   168     protected Raster parent;
   169 
   169 
   170     static private native void initIDs();
   170     private static native void initIDs();
   171     static {
   171     static {
   172         ColorModel.loadLibraries();
   172         ColorModel.loadLibraries();
   173         initIDs();
   173         initIDs();
   174     }
   174     }
   175 
   175 
  1137      * coordinate from the Raster coordinate system to the SampleModel
  1137      * coordinate from the Raster coordinate system to the SampleModel
  1138      * coordinate system, this value must be subtracted.
  1138      * coordinate system, this value must be subtracted.
  1139      * @return the X translation from the coordinate space of the
  1139      * @return the X translation from the coordinate space of the
  1140      *         Raster's SampleModel to that of the Raster.
  1140      *         Raster's SampleModel to that of the Raster.
  1141      */
  1141      */
  1142     final public int getSampleModelTranslateX() {
  1142     public final int getSampleModelTranslateX() {
  1143         return sampleModelTranslateX;
  1143         return sampleModelTranslateX;
  1144     }
  1144     }
  1145 
  1145 
  1146     /**
  1146     /**
  1147      * Returns the Y translation from the coordinate system of the
  1147      * Returns the Y translation from the coordinate system of the
  1149      * coordinate from the Raster coordinate system to the SampleModel
  1149      * coordinate from the Raster coordinate system to the SampleModel
  1150      * coordinate system, this value must be subtracted.
  1150      * coordinate system, this value must be subtracted.
  1151      * @return the Y translation from the coordinate space of the
  1151      * @return the Y translation from the coordinate space of the
  1152      *         Raster's SampleModel to that of the Raster.
  1152      *         Raster's SampleModel to that of the Raster.
  1153      */
  1153      */
  1154     final public int getSampleModelTranslateY() {
  1154     public final int getSampleModelTranslateY() {
  1155         return sampleModelTranslateY;
  1155         return sampleModelTranslateY;
  1156     }
  1156     }
  1157 
  1157 
  1158     /**
  1158     /**
  1159      * Create a compatible WritableRaster the same size as this Raster with
  1159      * Create a compatible WritableRaster the same size as this Raster with
  1358     }
  1358     }
  1359 
  1359 
  1360     /** Returns the minimum valid X coordinate of the Raster.
  1360     /** Returns the minimum valid X coordinate of the Raster.
  1361      *  @return the minimum x coordinate of this <code>Raster</code>.
  1361      *  @return the minimum x coordinate of this <code>Raster</code>.
  1362      */
  1362      */
  1363     final public int getMinX() {
  1363     public final int getMinX() {
  1364         return minX;
  1364         return minX;
  1365     }
  1365     }
  1366 
  1366 
  1367     /** Returns the minimum valid Y coordinate of the Raster.
  1367     /** Returns the minimum valid Y coordinate of the Raster.
  1368      *  @return the minimum y coordinate of this <code>Raster</code>.
  1368      *  @return the minimum y coordinate of this <code>Raster</code>.
  1369      */
  1369      */
  1370     final public int getMinY() {
  1370     public final int getMinY() {
  1371         return minY;
  1371         return minY;
  1372     }
  1372     }
  1373 
  1373 
  1374     /** Returns the width in pixels of the Raster.
  1374     /** Returns the width in pixels of the Raster.
  1375      *  @return the width of this <code>Raster</code>.
  1375      *  @return the width of this <code>Raster</code>.
  1376      */
  1376      */
  1377     final public int getWidth() {
  1377     public final int getWidth() {
  1378         return width;
  1378         return width;
  1379     }
  1379     }
  1380 
  1380 
  1381     /** Returns the height in pixels of the Raster.
  1381     /** Returns the height in pixels of the Raster.
  1382      *  @return the height of this <code>Raster</code>.
  1382      *  @return the height of this <code>Raster</code>.
  1383      */
  1383      */
  1384     final public int getHeight() {
  1384     public final int getHeight() {
  1385         return height;
  1385         return height;
  1386     }
  1386     }
  1387 
  1387 
  1388     /** Returns the number of bands (samples per pixel) in this Raster.
  1388     /** Returns the number of bands (samples per pixel) in this Raster.
  1389      *  @return the number of bands of this <code>Raster</code>.
  1389      *  @return the number of bands of this <code>Raster</code>.
  1390      */
  1390      */
  1391     final public int getNumBands() {
  1391     public final int getNumBands() {
  1392         return numBands;
  1392         return numBands;
  1393     }
  1393     }
  1394 
  1394 
  1395     /**
  1395     /**
  1396      *  Returns the number of data elements needed to transfer one pixel
  1396      *  Returns the number of data elements needed to transfer one pixel
  1401      *  as an array of getNumDataElements() elements of a primitive type given
  1401      *  as an array of getNumDataElements() elements of a primitive type given
  1402      *  by getTransferType().  The TransferType may or may not be the same
  1402      *  by getTransferType().  The TransferType may or may not be the same
  1403      *  as the storage data type of the DataBuffer.
  1403      *  as the storage data type of the DataBuffer.
  1404      *  @return the number of data elements.
  1404      *  @return the number of data elements.
  1405      */
  1405      */
  1406     final public int getNumDataElements() {
  1406     public final int getNumDataElements() {
  1407         return sampleModel.getNumDataElements();
  1407         return sampleModel.getNumDataElements();
  1408     }
  1408     }
  1409 
  1409 
  1410     /**
  1410     /**
  1411      *  Returns the TransferType used to transfer pixels via the
  1411      *  Returns the TransferType used to transfer pixels via the
  1417      *  by getTransferType().  The TransferType may or may not be the same
  1417      *  by getTransferType().  The TransferType may or may not be the same
  1418      *  as the storage data type of the DataBuffer.  The TransferType will
  1418      *  as the storage data type of the DataBuffer.  The TransferType will
  1419      *  be one of the types defined in DataBuffer.
  1419      *  be one of the types defined in DataBuffer.
  1420      *  @return this transfer type.
  1420      *  @return this transfer type.
  1421      */
  1421      */
  1422     final public int getTransferType() {
  1422     public final int getTransferType() {
  1423         return sampleModel.getTransferType();
  1423         return sampleModel.getTransferType();
  1424     }
  1424     }
  1425 
  1425 
  1426     /** Returns the DataBuffer associated with this Raster.
  1426     /** Returns the DataBuffer associated with this Raster.
  1427      *  @return the <code>DataBuffer</code> of this <code>Raster</code>.
  1427      *  @return the <code>DataBuffer</code> of this <code>Raster</code>.