singlepixelpackedsamplemodel.html
来自「API資料大全」· HTML 代码 · 共 905 行 · 第 1/4 页
HTML
905 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:34:16 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class SinglePixelPackedSampleModel</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SinglePixelPackedSampleModel.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../java/awt/image/ShortLookupTable.html"><B>PREV CLASS</B></A> <A HREF="../../../java/awt/image/WritableRaster.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="SinglePixelPackedSampleModel.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#fields_inherited_from_class_java.awt.image.SampleModel">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.awt.image</FONT><BR>Class SinglePixelPackedSampleModel</H2><PRE><A HREF="../../../java/lang/Object.html">java.lang.Object</A> | +--<A HREF="../../../java/awt/image/SampleModel.html">java.awt.image.SampleModel</A> | +--<B>java.awt.image.SinglePixelPackedSampleModel</B></PRE><HR><DL><DT>public class <B>SinglePixelPackedSampleModel</B><DT>extends <A HREF="../../../java/awt/image/SampleModel.html">SampleModel</A></DL><P>This class represents pixel data packed such that the N samples which make up a single pixel are stored in a single data array element, and each data data array element holds samples for only one pixel. This class supports <A HREF="../../../java/awt/image/DataBuffer.html#TYPE_BYTE"><CODE>TYPE_BYTE</CODE></A>, <A HREF="../../../java/awt/image/DataBuffer.html#TYPE_USHORT"><CODE>TYPE_USHORT</CODE></A>, <A HREF="../../../java/awt/image/DataBuffer.html#TYPE_INT"><CODE>TYPE_INT</CODE></A> data types. All data array elements reside in the first bank of a DataBuffer. Accessor methods are provided so that the image data can be manipulated directly. Scanline stride is the number of data array elements between a given sample and the corresponding sample in the same column of the next scanline. Bit masks are the masks required to extract the samples representing the bands of the pixel. Bit offsets are the offsets in bits into the data array element of the samples representing the bands of the pixel. <p> The following code illustrates extracting the bits of the sample representing band <code>b</code> for pixel <code>x,y</code> from DataBuffer <code>data</code>: <pre> int sample = data.getElem(y * scanlineStride + x); sample = (sample & bitMasks[b]) >>> bitOffsets[b]; </pre><P><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="fields_inherited_from_class_java.awt.image.SampleModel"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class java.awt.image.<A HREF="../../../java/awt/image/SampleModel.html">SampleModel</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/awt/image/SampleModel.html#dataType">dataType</A>, <A HREF="../../../java/awt/image/SampleModel.html#height">height</A>, <A HREF="../../../java/awt/image/SampleModel.html#numBands">numBands</A>, <A HREF="../../../java/awt/image/SampleModel.html#width">width</A></CODE></TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/image/SinglePixelPackedSampleModel.html#SinglePixelPackedSampleModel(int, int, int, int[])">SinglePixelPackedSampleModel</A></B>(int dataType, int w, int h, int[] bitMasks)</CODE><BR> Constructs a SinglePixelPackedSampleModel with bitMasks.length bands.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/image/SinglePixelPackedSampleModel.html#SinglePixelPackedSampleModel(int, int, int, int, int[])">SinglePixelPackedSampleModel</A></B>(int dataType, int w, int h, int scanlineStride, int[] bitMasks)</CODE><BR> Constructs a SinglePixelPackedSampleModel with bitMasks.length bands and a scanline stride equal to scanlineStride data array elements.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/image/SampleModel.html">SampleModel</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/SinglePixelPackedSampleModel.html#createCompatibleSampleModel(int, int)">createCompatibleSampleModel</A></B>(int w, int h)</CODE><BR> This creates a new SinglePixelPackedSampleModel with the specified width and height.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/image/DataBuffer.html">DataBuffer</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/SinglePixelPackedSampleModel.html#createDataBuffer()">createDataBuffer</A></B>()</CODE><BR> Creates a DataBuffer that corresponds to this SinglePixelPackedSampleModel.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/image/SampleModel.html">SampleModel</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/SinglePixelPackedSampleModel.html#createSubsetSampleModel(int[])">createSubsetSampleModel</A></B>(int[] bands)</CODE><BR> This creates a new SinglePixelPackedSampleModel with a subset of the bands of this SinglePixelPackedSampleModel.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/SinglePixelPackedSampleModel.html#getBitMasks()">getBitMasks</A></B>()</CODE><BR> Returns the bit masks for all bands.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/SinglePixelPackedSampleModel.html#getBitOffsets()">getBitOffsets</A></B>()</CODE><BR> Returns the bit offsets into the data array element representing a pixel for all bands.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/SinglePixelPackedSampleModel.html#getDataElements(int, int, java.lang.Object, java.awt.image.DataBuffer)">getDataElements</A></B>(int x, int y, <A HREF="../../../java/lang/Object.html">Object</A> obj, <A HREF="../../../java/awt/image/DataBuffer.html">DataBuffer</A> data)</CODE><BR> Returns data for a single pixel in a primitive array of type TransferType.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/SinglePixelPackedSampleModel.html#getNumDataElements()">getNumDataElements</A></B>()</CODE><BR> Returns the number of data elements needed to transfer one pixel via the getDataElements and setDataElements methods.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/image/SinglePixelPackedSampleModel.html#getOffset(int, int)">getOffset</A></B>(int x, int y)</CODE><BR> Returns the offset (in data array elements) of pixel (x,y).</TD></TR>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?