⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 nioimagebuffer.html

📁 JAVA多媒体开发类库说明
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="NioImageBuffer(int, int, javax.media.j3d.NioImageBuffer.ImageType)"><!-- --></A><H3>NioImageBuffer</H3><PRE>public <B>NioImageBuffer</B>(int&nbsp;width,                      int&nbsp;height,                      <A HREF="../../../javax/media/j3d/NioImageBuffer.ImageType.html" title="enum in javax.media.j3d">NioImageBuffer.ImageType</A>&nbsp;imageType)</PRE><DL><DD>Constructs an NIO image buffer of the specified size and type. A direct NIO buffer of the correct type (ByteBuffer or IntBuffer) and size to match the input parameters is allocated.<P><DL><DT><B>Parameters:</B><DD><CODE>width</CODE> - width of the image<DD><CODE>height</CODE> - height of the image<DD><CODE>imageType</CODE> - type of the image.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if width < 1 or height < 1<DD><CODE>java.lang.NullPointerException</CODE> - if imageType is null</DL></DL><HR><A NAME="NioImageBuffer(int, int, javax.media.j3d.NioImageBuffer.ImageType, java.nio.Buffer)"><!-- --></A><H3>NioImageBuffer</H3><PRE>public <B>NioImageBuffer</B>(int&nbsp;width,                      int&nbsp;height,                      <A HREF="../../../javax/media/j3d/NioImageBuffer.ImageType.html" title="enum in javax.media.j3d">NioImageBuffer.ImageType</A>&nbsp;imageType,                      java.nio.Buffer&nbsp;dataBuffer)</PRE><DL><DD>Constructs an NIO image buffer of the specified size and type, using the specified dataBuffer. The the byte order of the specified dataBuffer must match the native byte order of the underlying platform. For best performance, the NIO buffer should be a direct buffer.<P><DL><DT><B>Parameters:</B><DD><CODE>width</CODE> - width of the image<DD><CODE>height</CODE> - height of the image<DD><CODE>imageType</CODE> - type of the image.<DD><CODE>dataBuffer</CODE> - an NIO buffer of the correct type (ByteBuffer or IntBuffer) to match the specified imageType. This constructor will create a new view of the buffer, and will call <code>rewind</code> on that view, such that elements 0 through <code>dataBuffer.limit()-1</code> will be available internally. The number of elements in the buffer must be exactly <code>width*height*numElementsPerPixel</code>, where <code>numElementsPerPixel</code> is 3 for TYPE_3BYTE_BGR and TYPE_3BYTE_RGB, 4 for TYPE_4BYTE_ABGR and TYPE_4BYTE_RGBA, and 1 for all other types.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if width < 1 or height < 1<DD><CODE>java.lang.NullPointerException</CODE> - if imageType or dataBuffer is null<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the type of the dataBuffer does not match the imageType<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>dataBuffer.limit() != width*height*numElementsPerPixel</code><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the byte order of the specified dataBuffer does not match the native byte order of the underlying platform.</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getWidth()"><!-- --></A><H3>getWidth</H3><PRE>public int <B>getWidth</B>()</PRE><DL><DD>Gets the width of this data buffer.<P><DD><DL><DT><B>Returns:</B><DD>the width of this data buffer.</DL></DD></DL><HR><A NAME="getHeight()"><!-- --></A><H3>getHeight</H3><PRE>public int <B>getHeight</B>()</PRE><DL><DD>Gets the height of this data buffer.<P><DD><DL><DT><B>Returns:</B><DD>the width of this data buffer.</DL></DD></DL><HR><A NAME="getImageType()"><!-- --></A><H3>getImageType</H3><PRE>public <A HREF="../../../javax/media/j3d/NioImageBuffer.ImageType.html" title="enum in javax.media.j3d">NioImageBuffer.ImageType</A> <B>getImageType</B>()</PRE><DL><DD>Gets the image type of this data buffer.<P><DD><DL><DT><B>Returns:</B><DD>the image type of this data buffer.</DL></DD></DL><HR><A NAME="setDataBuffer(java.nio.Buffer)"><!-- --></A><H3>setDataBuffer</H3><PRE>public void <B>setDataBuffer</B>(java.nio.Buffer&nbsp;dataBuffer)</PRE><DL><DD>Sets the data buffer to the specified input data buffer. The the byte order of the specified dataBuffer must match the native byte order of the underlying platform. For best performance, the NIO buffer should be a direct buffer.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>dataBuffer</CODE> - an NIO buffer of the correct type (ByteBuffer or IntBuffer) to match the imageType of this NioImageBuffer. This method will create a new view of the buffer, and will call <code>rewind</code> on that view, such that elements 0 through <code>dataBuffer.limit()-1</code> will be available internally. The number of elements in the buffer must be exactly <code>width*height*numElementsPerPixel</code>, where <code>numElementsPerPixel</code> is 3 for TYPE_3BYTE_BGR and TYPE_3BYTE_RGB, 4 for TYPE_4BYTE_ABGR and TYPE_4BYTE_RGBA, and 1 for all other types.<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if dataBuffer is null<DD><CODE>java.lang.IllegalArgumentException</CODE> - if the type of the dataBuffer does not match the imageType<DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>dataBuffer.limit() != width*height*numElementsPerPixel</code><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the byte order of the specified dataBuffer does not match the native byte order of the underlying platform.</DL></DD></DL><HR><A NAME="getDataBuffer()"><!-- --></A><H3>getDataBuffer</H3><PRE>public java.nio.Buffer <B>getDataBuffer</B>()</PRE><DL><DD>Gets the data buffer to the specified input data buffer.<P><DD><DL><DT><B>Returns:</B><DD>a view of the current data buffer for this NIO image buffer. This view will be rewound such that elements 0 through <code>dataBuffer.limit()-1</code> are available.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../javax/media/j3d/MultipleParentException.html" title="class in javax.media.j3d"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/media/j3d/NioImageBuffer.ImageType.html" title="enum in javax.media.j3d"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?javax/media/j3d/NioImageBuffer.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="NioImageBuffer.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1">Copyright (c) 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="../../../LICENSE-SPEC.html">license terms</a>.</BODY></HTML>

⌨️ 快捷键说明

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