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

📄 imagecomponent.html

📁 JAVA多媒体开发类库说明
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_06) on Wed Dec 13 16:20:02 PST 2006 --><TITLE>ImageComponent (Java 3D 1.5.0)</TITLE><META NAME="keywords" CONTENT="javax.media.j3d.ImageComponent class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="ImageComponent (Java 3D 1.5.0)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" 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_top_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/IllegalSharingException.html" title="class in javax.media.j3d"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/media/j3d/ImageComponent.ImageClass.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/ImageComponent.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="ImageComponent.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;<A HREF="#field_summary">FIELD</A>&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;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.media.j3d</FONT><BR>Class ImageComponent</H2><PRE>java.lang.Object  <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../javax/media/j3d/SceneGraphObject.html" title="class in javax.media.j3d">javax.media.j3d.SceneGraphObject</A>      <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../javax/media/j3d/NodeComponent.html" title="class in javax.media.j3d">javax.media.j3d.NodeComponent</A>          <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>javax.media.j3d.ImageComponent</B></PRE><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../javax/media/j3d/ImageComponent2D.html" title="class in javax.media.j3d">ImageComponent2D</A>, <A HREF="../../../javax/media/j3d/ImageComponent3D.html" title="class in javax.media.j3d">ImageComponent3D</A></DD></DL><HR><DL><DT><PRE>public abstract class <B>ImageComponent</B><DT>extends <A HREF="../../../javax/media/j3d/NodeComponent.html" title="class in javax.media.j3d">NodeComponent</A></DL></PRE><P>Abstract class that is used to define 2D or 3D ImageComponent classes used in a Java 3D scene graph.  This is used for texture images, background images and raster components of Shape3D nodes. <p> Image data may be passed to this ImageComponent object in one of two ways: by copying the image data into this object or by accessing the image data by reference. <p> <ul> <li> <b>By Copying:</b> By default, the set and get image methods copy the image data into or out of this ImageComponent object.  This is appropriate for many applications, since the application may reuse the RenderedImage object after copying it to the ImageComponent. </li> <li><b>By Reference:</b> A new feature in Java 3D version 1.2 allows image data to be accessed by reference, directly from the RenderedImage object. To use this feature, you need to construct an ImageComponent object with the <code>byReference</code> flag set to <code>true</code>. In this mode, a reference to the input data is saved, but the data itself is not necessarily copied (although it may be, depending on the value of the <code>yUp</code> flag, the format of the ImageComponent, and the format of the RenderedImage).  Image data referenced by an ImageComponent object can only be modified via the updateData method. Applications must exercise care not to violate this rule.  If any referenced RenderedImage is modified outside the updateData method after it has been passed to an ImageComponent object, the results are undefined. Another restriction in by-reference mode is that if the specified RenderedImage is not an instance of BufferedImage, then this ImageComponent cannot be used for readRaster or off-screen rendering operations, since these operations modify the ImageComponent data. </li> </ul> <p> An image component object also specifies whether the orientation of its image data is "y-up" or "y-down" (the default).  Y-up mode causes images to be interpreted as having their origin at the lower left (rather than the default upper left) of a texture or raster image with successive scan lines moving up.  This is more consistent with texture mapping data onto a surface, and maps directly into the the way textures are used in OpenGL and other 3D APIs.  Setting the <code>yUp</code> flag to true in conjunction with setting the <code>byReference</code> flag to true makes it possible for Java 3D to avoid copying the texture map in some cases. <p> Note that all color fields are treated as unsigned values, even though Java does not directly support unsigned variables.  This means, for example, that an ImageComponent using a format of FORMAT_RGB5 can represent red, green, and blue values between 0 and 31, while an ImageComponent using a format of FORMAT_RGB8 can represent color values between 0 and 255.  Even when byte values are used to create a RenderedImage with 8-bit color components, the resulting colors (bytes) are interpreted as if they were unsigned. Values greater than 127 can be assigned to a byte variable using a type cast.  For example: <ul>byteVariable = (byte) intValue; // intValue can be > 127</ul> If intValue is greater than 127, then byteVariable will be negative.  The correct value will be extracted when it is used (by masking off the upper bits).<P><P><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><A NAME="nested_class_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Nested Class Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/ImageComponent.ImageClass.html" title="enum in javax.media.j3d">ImageComponent.ImageClass</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Used to specify the class of the image being wrapped.</TD></TR></TABLE>&nbsp;<!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Field Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/ImageComponent.html#ALLOW_FORMAT_READ">ALLOW_FORMAT_READ</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that this ImageComponent object allows reading its format component information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/ImageComponent.html#ALLOW_IMAGE_READ">ALLOW_IMAGE_READ</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that this ImageComponent object allows reading its image component information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/ImageComponent.html#ALLOW_IMAGE_WRITE">ALLOW_IMAGE_WRITE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that this ImageComponent object allows writing its image component information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/ImageComponent.html#ALLOW_SIZE_READ">ALLOW_SIZE_READ</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that this ImageComponent object allows reading its size component information (width, height, and depth).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/ImageComponent.html#FORMAT_CHANNEL8">FORMAT_CHANNEL8</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that each pixel contains 1 8-bit channel: it can be used for only luminance or only alpha or only intensity.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/ImageComponent.html#FORMAT_LUM4_ALPHA4">FORMAT_LUM4_ALPHA4</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that each pixel contains 2 4-bit channels: one each for luminance and alpha.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/ImageComponent.html#FORMAT_LUM8_ALPHA8">FORMAT_LUM8_ALPHA8</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that each pixel contains 2 8-bit channels: one each for luminance and alpha.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/ImageComponent.html#FORMAT_R3_G3_B2">FORMAT_R3_G3_B2</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that each pixel contains 2 3-bit channels: one each for red, green, and 1 2-bit channel for blue.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/ImageComponent.html#FORMAT_RGB">FORMAT_RGB</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that each pixel contains 3 8-bit channels: one each for red, green, blue.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/ImageComponent.html#FORMAT_RGB4">FORMAT_RGB4</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that each pixel contains 3 4-bit channels: one each for red, green, blue.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/ImageComponent.html#FORMAT_RGB5">FORMAT_RGB5</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that each pixel contains 3 5-bit channels: one each for red, green, blue.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/ImageComponent.html#FORMAT_RGB5_A1">FORMAT_RGB5_A1</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that each pixel contains 3 5-bit channels: one each for red, green, blue and 1 1-bit channel for alpha.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/ImageComponent.html#FORMAT_RGB8">FORMAT_RGB8</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Specifies that each pixel contains 3 8-bit channels: one each for red, green, blue.</TD></TR>

⌨️ 快捷键说明

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