raster.html

来自「API資料大全」· HTML 代码 · 共 1,295 行 · 第 1/5 页

HTML
1,295
字号
 and TYPE_USHORT.</DL><HR><A NAME="createInterleavedRaster(int, int, int, int, int, int[], java.awt.Point)"><!-- --></A><H3>createInterleavedRaster</H3><PRE>public static <A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A> <B>createInterleavedRaster</B>(int&nbsp;dataType,                                                     int&nbsp;w,                                                     int&nbsp;h,                                                     int&nbsp;scanlineStride,                                                     int&nbsp;pixelStride,                                                     int[]&nbsp;bandOffsets,                                                     <A HREF="../../../java/awt/Point.html">Point</A>&nbsp;location)</PRE><DL><DD>Creates a Raster based on a PixelInterleavedSampleModel with the specified data type, width, height, scanline stride, pixel stride, and band offsets.  The number of bands is inferred from bandOffsets.length. <p> The upper left corner of the Raster is given by the location argument.  If location is null, (0, 0) will be used. The dataType parameter should be one of the enumerated values defined in the DataBuffer class. <p> Note that interleaved <code>DataBuffer.TYPE_INT</code> Rasters are not supported.  To create a 1-band Raster of type <code>DataBuffer.TYPE_INT</code>, use Raster.createPackedRaster(). <p> The only dataTypes supported currently are TYPE_BYTE and TYPE_USHORT.<DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>dataType</code> is not         one of the supported data types, which are         <code>DataBuffer.TYPE_BYTE</code>,          <code>DataBuffer.TYPE_USHORT</code>          or <code>DataBuffer.TYPE_INT</code></DL></DD></DL><HR><A NAME="createBandedRaster(int, int, int, int, java.awt.Point)"><!-- --></A><H3>createBandedRaster</H3><PRE>public static <A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A> <B>createBandedRaster</B>(int&nbsp;dataType,                                                int&nbsp;w,                                                int&nbsp;h,                                                int&nbsp;bands,                                                <A HREF="../../../java/awt/Point.html">Point</A>&nbsp;location)</PRE><DL><DD>Creates a Raster based on a BandedSampleModel with the specified data type, width, height, and number of bands. <p> The upper left corner of the Raster is given by the location argument.  If location is null, (0, 0) will be used. The dataType parameter should be one of the enumerated values defined in the DataBuffer class. <p> The only dataTypes supported currently are TYPE_BYTE, TYPE_USHORT, and TYPE_INT.<DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/ArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</A></CODE> - if <code>bands</code>         is less than 1</DL></DD></DL><HR><A NAME="createBandedRaster(int, int, int, int, int[], int[], java.awt.Point)"><!-- --></A><H3>createBandedRaster</H3><PRE>public static <A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A> <B>createBandedRaster</B>(int&nbsp;dataType,                                                int&nbsp;w,                                                int&nbsp;h,                                                int&nbsp;scanlineStride,                                                int[]&nbsp;bankIndices,                                                int[]&nbsp;bandOffsets,                                                <A HREF="../../../java/awt/Point.html">Point</A>&nbsp;location)</PRE><DL><DD>Creates a Raster based on a BandedSampleModel with the specified data type, width, height, scanline stride, bank indices and band offsets.  The number of bands is inferred from bankIndices.length and bandOffsets.length, which must be the same. <p> The upper left corner of the Raster is given by the location argument.  The dataType parameter should be one of the enumerated values defined in the DataBuffer class. <p> The only dataTypes supported currently are TYPE_BYTE, TYPE_USHORT, and TYPE_INT.<DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>dataType</code> is not         one of the supported data types, which are         <code>DataBuffer.TYPE_BYTE</code>,          <code>DataBuffer.TYPE_USHORT</code>          or <code>DataBuffer.TYPE_INT</code><DD><CODE><A HREF="../../../java/lang/ArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</A></CODE> - if <code>bankIndices</code>          or <code>bandOffsets</code> is <code>null</code></DL></DD></DL><HR><A NAME="createPackedRaster(int, int, int, int[], java.awt.Point)"><!-- --></A><H3>createPackedRaster</H3><PRE>public static <A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A> <B>createPackedRaster</B>(int&nbsp;dataType,                                                int&nbsp;w,                                                int&nbsp;h,                                                int[]&nbsp;bandMasks,                                                <A HREF="../../../java/awt/Point.html">Point</A>&nbsp;location)</PRE><DL><DD>Creates a Raster based on a SinglePixelPackedSampleModel with the specified data type, width, height, and band masks. The number of bands is inferred from bandMasks.length.  <p> The upper left corner of the Raster is given by the location argument.  If location is null, (0, 0) will be used. The dataType parameter should be one of the enumerated values defined in the DataBuffer class. <p> The only dataTypes supported currently are TYPE_BYTE, TYPE_USHORT, and TYPE_INT.<DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>dataType</code> is not         one of the supported data types, which are         <code>DataBuffer.TYPE_BYTE</code>,          <code>DataBuffer.TYPE_USHORT</code>          or <code>DataBuffer.TYPE_INT</code></DL></DD></DL><HR><A NAME="createPackedRaster(int, int, int, int, int, java.awt.Point)"><!-- --></A><H3>createPackedRaster</H3><PRE>public static <A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A> <B>createPackedRaster</B>(int&nbsp;dataType,                                                int&nbsp;w,                                                int&nbsp;h,                                                int&nbsp;bands,                                                int&nbsp;bitsPerBand,                                                <A HREF="../../../java/awt/Point.html">Point</A>&nbsp;location)</PRE><DL><DD>Creates a Raster based on a packed SampleModel with the specified data type, width, height, number of bands, and bits per band.  If the number of bands is one, the SampleModel will be a MultiPixelPackedSampleModel. <p> If the number of bands is more than one, the SampleModel will be a SinglePixelPackedSampleModel, with each band having bitsPerBand bits.  In either case, the requirements on dataType and bitsPerBand imposed by the corresponding SampleModel must be met. <p> The upper left corner of the Raster is given by the location argument.  If location is null, (0, 0) will be used. The dataType parameter should be one of the enumerated values defined in the DataBuffer class. <p> The only dataTypes supported currently are TYPE_BYTE, TYPE_USHORT, and TYPE_INT.<DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the product of          <code>bitsPerBand</code> and <code>bands</code> is          greater than the number of bits held by          <code>dataType</code><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>bitsPerBand</code> or         <code>bands</code> is not greater than zero<DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>dataType</code> is not         one of the supported data types, which are         <code>DataBuffer.TYPE_BYTE</code>,          <code>DataBuffer.TYPE_USHORT</code>          or <code>DataBuffer.TYPE_INT</code></DL></DD></DL><HR><A NAME="createInterleavedRaster(java.awt.image.DataBuffer, int, int, int, int, int[], java.awt.Point)"><!-- --></A><H3>createInterleavedRaster</H3><PRE>public static <A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A> <B>createInterleavedRaster</B>(<A HREF="../../../java/awt/image/DataBuffer.html">DataBuffer</A>&nbsp;dataBuffer,                                                     int&nbsp;w,                                                     int&nbsp;h,                                                     int&nbsp;scanlineStride,                                                     int&nbsp;pixelStride,                                                     int[]&nbsp;bandOffsets,                                                     <A HREF="../../../java/awt/Point.html">Point</A>&nbsp;location)</PRE><DL><DD>Creates a Raster based on a PixelInterleavedSampleModel with the specified DataBuffer, width, height, scanline stride, pixel stride, and band offsets.  The number of bands is inferred from bandOffsets.length.  The upper left corner of the Raster is given by the location argument.  If location is null, (0, 0) will be used. <p> Note that interleaved <code>DataBuffer.TYPE_INT</code> Rasters are not supported.  To create a 1-band Raster of type <code>DataBuffer.TYPE_INT</code>, use Raster.createPackedRaster().<DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>dataType</code> is not         one of the supported data types, which are         <code>DataBuffer.TYPE_BYTE</code>,          <code>DataBuffer.TYPE_USHORT</code><DD><CODE><A HREF="../../../java/awt/image/RasterFormatException.html">RasterFormatException</A></CODE> - if <code>dataBuffer</code> has more         than one bank.</DL></DD></DL><HR><A NAME="createBandedRaster(java.awt.image.DataBuffer, int, int, int, int[], int[], java.awt.Point)"><!-- --></A><H3>createBandedRaster</H3><PRE>public static <A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A> <B>createBandedRaster</B>(<A HREF="../../../java/awt/image/DataBuffer.html">DataBuffer</A>&nbsp;dataBuffer,                                                int&nbsp;w,                                                int&nbsp;h,                                                int&nbsp;scanlineStride,                                                int[]&nbsp;bankIndices,                                                int[]&nbsp;bandOffsets,                                                <A HREF="../../../java/awt/Point.html">Point</A>&nbsp;location)</PRE><DL><DD>Creates a Raster based on a BandedSampleModel with the specified DataBuffer, width, height, scanline stride, bank indices, and band offsets.  The number of bands is inferred from bankIndices.length and bandOffsets.length, which must be the same.  The upper left corner of the Raster is given by the location argument.  If location is null, (0, 0) will be used.<DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>dataType</code> is not         one of the supported data types, which are         <code>DataBuffer.TYPE_BYTE</code>,          <code>DataBuffer.TYPE_USHORT</code>          or <code>DataBuffer.TYPE_INT</code></DL></DD></DL><HR><A NAME="createPackedRaster(java.awt.image.DataBuffer, int, int, int, int[], java.awt.Point)"><!-- --></A><H3>createPackedRaster</H3><PRE>public static <A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A> <B>createPackedRaster</B>(<A HREF="../../../java/awt/image/DataBuffer.html">DataBuffer</A>&nbsp;dataBuffer,                                                int&nbsp;w,                                                int&nbsp;h,                                                int&nbsp;scanlineStride,                                                int[]&nbsp;bandMasks,                                                <A HREF="../../../java/awt/Point.html">Point</A>&nbsp;location)</PRE><DL><DD>Creates a Raster based on a SinglePixelPackedSampleModel with the specified DataBuffer, width, height, scanline stride, and band masks.  The number of bands is inferred from bandMasks.length. The upper left corner of the Raster is given by the location argument.  If location is null, (0, 0) will be used.<DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>dataType</code> is not         one of the supported data types, which are         <code>DataBuffer.TYPE_BYTE</code>,          <code>DataBuffer.TYPE_USHORT</code>          or <code>DataBuffer.TYPE_INT</code><DD><CODE><A HREF="../../../java/awt/image/RasterFormatException.html">RasterFormatException</A></CODE> - if <code>dataBuffer</code> has more         than one bank.</DL></DD></DL><HR><A NAME="createPackedRaster(java.awt.image.DataBuffer, int, int, int, java.awt.Point)"><!-- --></A><H3>createPackedRaster</H3><PRE>public static <A HREF="../../../java/awt/image/WritableRaster.html">WritableRaster</A> <B>createPackedRaster</B>(<A HREF="../../../java/awt/image/DataBuffer.html">DataBuffer</A>&nbsp;dataBuffer,                                                int&nbsp;w,                                                int&nbsp;h,                                                int&nbsp;bitsPerPixel,                                                <A HREF="../../../java/awt/Point.html">Point</A>&nbsp;location)</PRE><DL><DD>Creates a Raster based on a MultiPixelPackedSampleModel with the specified DataBuffer, width, height, and bits per 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?