raster.html

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

HTML
1,295
字号
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the samples for a specified band for a specified rectangle of pixels in a double array, one sample per array element.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;float[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/Raster.html#getSamples(int, int, int, int, int, float[])">getSamples</A></B>(int&nbsp;x,           int&nbsp;y,           int&nbsp;w,           int&nbsp;h,           int&nbsp;b,           float[]&nbsp;fArray)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the samples for a specified band for the specified rectangle of pixels in a float array, one sample per array element.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/Raster.html#getSamples(int, int, int, int, int, int[])">getSamples</A></B>(int&nbsp;x,           int&nbsp;y,           int&nbsp;w,           int&nbsp;h,           int&nbsp;b,           int[]&nbsp;iArray)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the samples for a specified band for the specified rectangle of pixels in an int array, one sample per array element.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/Raster.html#getTransferType()">getTransferType</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the TransferType used to transfer pixels via the  getDataElements and setDataElements methods.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/Raster.html#getWidth()">getWidth</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the width in pixels of the Raster.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="sampleModel"><!-- --></A><H3>sampleModel</H3><PRE>protected <A HREF="../../../java/awt/image/SampleModel.html">SampleModel</A> <B>sampleModel</B></PRE><DL><DD>The SampleModel that describes how pixels from this Raster are stored in the DataBuffer.</DL><HR><A NAME="dataBuffer"><!-- --></A><H3>dataBuffer</H3><PRE>protected <A HREF="../../../java/awt/image/DataBuffer.html">DataBuffer</A> <B>dataBuffer</B></PRE><DL><DD>The DataBuffer that stores the image data.</DL><HR><A NAME="minX"><!-- --></A><H3>minX</H3><PRE>protected int <B>minX</B></PRE><DL><DD>The X coordinate of the upper-left pixel of this Raster.</DL><HR><A NAME="minY"><!-- --></A><H3>minY</H3><PRE>protected int <B>minY</B></PRE><DL><DD>The Y coordinate of the upper-left pixel of this Raster.</DL><HR><A NAME="width"><!-- --></A><H3>width</H3><PRE>protected int <B>width</B></PRE><DL><DD>The width of this Raster.</DL><HR><A NAME="height"><!-- --></A><H3>height</H3><PRE>protected int <B>height</B></PRE><DL><DD>The height of this Raster.</DL><HR><A NAME="sampleModelTranslateX"><!-- --></A><H3>sampleModelTranslateX</H3><PRE>protected int <B>sampleModelTranslateX</B></PRE><DL><DD>The X translation from the coordinate space of the Raster's SampleModel to that of the Raster.</DL><HR><A NAME="sampleModelTranslateY"><!-- --></A><H3>sampleModelTranslateY</H3><PRE>protected int <B>sampleModelTranslateY</B></PRE><DL><DD>The Y translation from the coordinate space of the Raster's SampleModel to that of the Raster.</DL><HR><A NAME="numBands"><!-- --></A><H3>numBands</H3><PRE>protected int <B>numBands</B></PRE><DL><DD>The number of bands in the Raster.</DL><HR><A NAME="numDataElements"><!-- --></A><H3>numDataElements</H3><PRE>protected int <B>numDataElements</B></PRE><DL><DD>The number of DataBuffer data elements per pixel.</DL><HR><A NAME="parent"><!-- --></A><H3>parent</H3><PRE>protected <A HREF="../../../java/awt/image/Raster.html">Raster</A> <B>parent</B></PRE><DL><DD>The parent of this Raster, or null.</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Raster(java.awt.image.SampleModel, java.awt.Point)"><!-- --></A><H3>Raster</H3><PRE>protected <B>Raster</B>(<A HREF="../../../java/awt/image/SampleModel.html">SampleModel</A>&nbsp;sampleModel,                 <A HREF="../../../java/awt/Point.html">Point</A>&nbsp;origin)</PRE><DL><DD>Constructs a Raster with the given SampleModel.  The Raster's  upper left corner is origin and it is the same size as the  SampleModel.  A DataBuffer large enough to describe the  Raster is automatically created.<DD><DL><DT><B>Parameters:</B><DD><CODE>sampleModel</CODE> - The SampleModel that specifies the layout.<DD><CODE>origin</CODE> - The Point that specified the origin.</DL></DD></DL><HR><A NAME="Raster(java.awt.image.SampleModel, java.awt.image.DataBuffer, java.awt.Point)"><!-- --></A><H3>Raster</H3><PRE>protected <B>Raster</B>(<A HREF="../../../java/awt/image/SampleModel.html">SampleModel</A>&nbsp;sampleModel,                 <A HREF="../../../java/awt/image/DataBuffer.html">DataBuffer</A>&nbsp;dataBuffer,                 <A HREF="../../../java/awt/Point.html">Point</A>&nbsp;origin)</PRE><DL><DD>Constructs a Raster with the given SampleModel and DataBuffer.  The Raster's upper left corner is origin and it is the same size  as the SampleModel.  The DataBuffer is not initialized and must  be compatible with SampleModel.<DD><DL><DT><B>Parameters:</B><DD><CODE>sampleModel</CODE> - The SampleModel that specifies the layout.<DD><CODE>dataBuffer</CODE> - The DataBuffer that contains the image data.<DD><CODE>origin</CODE> - The Point that specifies the origin.</DL></DD></DL><HR><A NAME="Raster(java.awt.image.SampleModel, java.awt.image.DataBuffer, java.awt.Rectangle, java.awt.Point, java.awt.image.Raster)"><!-- --></A><H3>Raster</H3><PRE>protected <B>Raster</B>(<A HREF="../../../java/awt/image/SampleModel.html">SampleModel</A>&nbsp;sampleModel,                 <A HREF="../../../java/awt/image/DataBuffer.html">DataBuffer</A>&nbsp;dataBuffer,                 <A HREF="../../../java/awt/Rectangle.html">Rectangle</A>&nbsp;aRegion,                 <A HREF="../../../java/awt/Point.html">Point</A>&nbsp;sampleModelTranslate,                 <A HREF="../../../java/awt/image/Raster.html">Raster</A>&nbsp;parent)</PRE><DL><DD>Constructs a Raster with the given SampleModel, DataBuffer, and parent.  aRegion specifies the bounding rectangle of the new Raster.  When translated into the base Raster's coordinate system, aRegion must be contained by the base Raster. (The base Raster is the Raster's ancestor which has no parent.) sampleModelTranslate specifies the sampleModelTranslateX and sampleModelTranslateY values of the new Raster. Note that this constructor should generally be called by other constructors or create methods, it should not be used directly.<DD><DL><DT><B>Parameters:</B><DD><CODE>sampleModel</CODE> - The SampleModel that specifies the layout.<DD><CODE>dataBuffer</CODE> - The DataBuffer that contains the image data.<DD><CODE>aRegion</CODE> - The Rectangle that specifies the image area.<DD><CODE>sampleModelTranslate</CODE> - The Point that specifies the translation                        from SampleModel to Raster coordinates.<DD><CODE>parent</CODE> - The parent (if any) of this raster.</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="createInterleavedRaster(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;bands,                                                     <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, 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> 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

⌨️ 快捷键说明

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