📄 transparencyattributes.html
字号:
<DD>Specifies that this TransparencyAttributes object allows writing its blend function.<P><DL><DT><B>Since:</B></DT> <DD>Java 3D 1.2</DD><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.media.j3d.TransparencyAttributes.ALLOW_BLEND_FUNCTION_WRITE">Constant Field Values</A></DL></DL><HR><A NAME="FASTEST"><!-- --></A><H3>FASTEST</H3><PRE>public static final int <B>FASTEST</B></PRE><DL><DD>Use the fastest available method for transparency.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setTransparencyMode(int)"><CODE>setTransparencyMode(int)</CODE></A>, <A HREF="../../../constant-values.html#javax.media.j3d.TransparencyAttributes.FASTEST">Constant Field Values</A></DL></DL><HR><A NAME="NICEST"><!-- --></A><H3>NICEST</H3><PRE>public static final int <B>NICEST</B></PRE><DL><DD>Use the nicest available method for transparency.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setTransparencyMode(int)"><CODE>setTransparencyMode(int)</CODE></A>, <A HREF="../../../constant-values.html#javax.media.j3d.TransparencyAttributes.NICEST">Constant Field Values</A></DL></DL><HR><A NAME="BLENDED"><!-- --></A><H3>BLENDED</H3><PRE>public static final int <B>BLENDED</B></PRE><DL><DD>Use alpha blended transparency. The blend equation is specified by the srcBlendFunction and dstBlendFunction attributes. The default equation is: <ul> <code>alpha<sub><font size=-1>src</font></sub>*src + (1-alpha<sub><font size=-1>src</font></sub>)*dst</code> </ul> where <code>alpha<sub><font size=-1>src</font></sub></code> is <code>1-transparency</code>. When this mode is used with a Raster object or with a Geometry that contains per-vertex colors with alpha, the alpha values in the Raster's image or in the Geometry's per-vertex colors are combined with the transparency value in this TransparencyAttributes object to perform blending. In this case, the alpha value used for blending at each pixel is: <ul> <code>alpha<sub><font size=-1>src</font></sub> = alpha<sub><font size=-1>pix</font></sub> * (1-transparency)</code>. </ul><P><DL><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setTransparencyMode(int)"><CODE>setTransparencyMode(int)</CODE></A>, <A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setSrcBlendFunction(int)"><CODE>setSrcBlendFunction(int)</CODE></A>, <A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setDstBlendFunction(int)"><CODE>setDstBlendFunction(int)</CODE></A>, <A HREF="../../../constant-values.html#javax.media.j3d.TransparencyAttributes.BLENDED">Constant Field Values</A></DL></DL><HR><A NAME="SCREEN_DOOR"><!-- --></A><H3>SCREEN_DOOR</H3><PRE>public static final int <B>SCREEN_DOOR</B></PRE><DL><DD>Use screen-door transparency. This is done using an on/off stipple pattern where the percentage of pixels that are transparent is approximately equal to the value specified by the transparency parameter.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setTransparencyMode(int)"><CODE>setTransparencyMode(int)</CODE></A>, <A HREF="../../../constant-values.html#javax.media.j3d.TransparencyAttributes.SCREEN_DOOR">Constant Field Values</A></DL></DL><HR><A NAME="NONE"><!-- --></A><H3>NONE</H3><PRE>public static final int <B>NONE</B></PRE><DL><DD>No transparency, opaque object.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setTransparencyMode(int)"><CODE>setTransparencyMode(int)</CODE></A>, <A HREF="../../../constant-values.html#javax.media.j3d.TransparencyAttributes.NONE">Constant Field Values</A></DL></DL><HR><A NAME="BLEND_ZERO"><!-- --></A><H3>BLEND_ZERO</H3><PRE>public static final int <B>BLEND_ZERO</B></PRE><DL><DD>Blend function: <code>f = 0</code>.<P><DL><DT><B>Since:</B></DT> <DD>Java 3D 1.2</DD><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setSrcBlendFunction(int)"><CODE>setSrcBlendFunction(int)</CODE></A>, <A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setDstBlendFunction(int)"><CODE>setDstBlendFunction(int)</CODE></A>, <A HREF="../../../constant-values.html#javax.media.j3d.TransparencyAttributes.BLEND_ZERO">Constant Field Values</A></DL></DL><HR><A NAME="BLEND_ONE"><!-- --></A><H3>BLEND_ONE</H3><PRE>public static final int <B>BLEND_ONE</B></PRE><DL><DD>Blend function: <code>f = 1</code>.<P><DL><DT><B>Since:</B></DT> <DD>Java 3D 1.2</DD><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setSrcBlendFunction(int)"><CODE>setSrcBlendFunction(int)</CODE></A>, <A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setDstBlendFunction(int)"><CODE>setDstBlendFunction(int)</CODE></A>, <A HREF="../../../constant-values.html#javax.media.j3d.TransparencyAttributes.BLEND_ONE">Constant Field Values</A></DL></DL><HR><A NAME="BLEND_SRC_ALPHA"><!-- --></A><H3>BLEND_SRC_ALPHA</H3><PRE>public static final int <B>BLEND_SRC_ALPHA</B></PRE><DL><DD>Blend function: <code>f = alpha<sub><font size=-1>src</font></sub></code>.<P><DL><DT><B>Since:</B></DT> <DD>Java 3D 1.2</DD><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setSrcBlendFunction(int)"><CODE>setSrcBlendFunction(int)</CODE></A>, <A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setDstBlendFunction(int)"><CODE>setDstBlendFunction(int)</CODE></A>, <A HREF="../../../constant-values.html#javax.media.j3d.TransparencyAttributes.BLEND_SRC_ALPHA">Constant Field Values</A></DL></DL><HR><A NAME="BLEND_ONE_MINUS_SRC_ALPHA"><!-- --></A><H3>BLEND_ONE_MINUS_SRC_ALPHA</H3><PRE>public static final int <B>BLEND_ONE_MINUS_SRC_ALPHA</B></PRE><DL><DD>Blend function: <code>f = 1-alpha<sub><font size=-1>src</font></sub></code>.<P><DL><DT><B>Since:</B></DT> <DD>Java 3D 1.2</DD><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setSrcBlendFunction(int)"><CODE>setSrcBlendFunction(int)</CODE></A>, <A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setDstBlendFunction(int)"><CODE>setDstBlendFunction(int)</CODE></A>, <A HREF="../../../constant-values.html#javax.media.j3d.TransparencyAttributes.BLEND_ONE_MINUS_SRC_ALPHA">Constant Field Values</A></DL></DL><HR><A NAME="BLEND_DST_COLOR"><!-- --></A><H3>BLEND_DST_COLOR</H3><PRE>public static final int <B>BLEND_DST_COLOR</B></PRE><DL><DD>Blend function: <code>f = color<sub><font size=-1>dst</font></sub></code>. <p>Note that this function may <i>only</i> be used as a source blend function.</p><P><DL><DT><B>Since:</B></DT> <DD>Java 3D 1.4</DD><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setSrcBlendFunction(int)"><CODE>setSrcBlendFunction(int)</CODE></A>, <A HREF="../../../constant-values.html#javax.media.j3d.TransparencyAttributes.BLEND_DST_COLOR">Constant Field Values</A></DL></DL><HR><A NAME="BLEND_ONE_MINUS_DST_COLOR"><!-- --></A><H3>BLEND_ONE_MINUS_DST_COLOR</H3><PRE>public static final int <B>BLEND_ONE_MINUS_DST_COLOR</B></PRE><DL><DD>Blend function: <code>f = 1-color<sub><font size=-1>dst</font></sub></code>. <p>Note that this function may <i>only</i> be used as a source blend function.</p><P><DL><DT><B>Since:</B></DT> <DD>Java 3D 1.4</DD><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setSrcBlendFunction(int)"><CODE>setSrcBlendFunction(int)</CODE></A>, <A HREF="../../../constant-values.html#javax.media.j3d.TransparencyAttributes.BLEND_ONE_MINUS_DST_COLOR">Constant Field Values</A></DL></DL><HR><A NAME="BLEND_SRC_COLOR"><!-- --></A><H3>BLEND_SRC_COLOR</H3><PRE>public static final int <B>BLEND_SRC_COLOR</B></PRE><DL><DD>Blend function: <code>f = color<sub><font size=-1>src</font></sub></code>. <p>Note that this function may <i>only</i> be used as a destination blend function.</p><P><DL><DT><B>Since:</B></DT> <DD>Java 3D 1.4</DD><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setDstBlendFunction(int)"><CODE>setDstBlendFunction(int)</CODE></A>, <A HREF="../../../constant-values.html#javax.media.j3d.TransparencyAttributes.BLEND_SRC_COLOR">Constant Field Values</A></DL></DL><HR><A NAME="BLEND_ONE_MINUS_SRC_COLOR"><!-- --></A><H3>BLEND_ONE_MINUS_SRC_COLOR</H3><PRE>public static final int <B>BLEND_ONE_MINUS_SRC_COLOR</B></PRE><DL><DD>Blend function: <code>f = 1-color<sub><font size=-1>src</font></sub></code>. <p>Note that this function may <i>only</i> be used as a destination blend function.</p><P><DL><DT><B>Since:</B></DT> <DD>Java 3D 1.4</DD><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/TransparencyAttributes.html#setDstBlendFunction(int)"><CODE>setDstBlendFunction(int)</CODE></A>, <A HREF="../../../constant-values.html#javax.media.j3d.TransparencyAttributes.BLEND_ONE_MINUS_SRC_COLOR">Constant Field Values</A></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_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>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="TransparencyAttributes()"><!-- --></A><H3>TransparencyAttributes</H3><PRE>public <B>TransparencyAttributes</B>()</PRE><DL><DD>Constructs a TransparencyAttributes object with default parameters. The default values are as follows: <ul> transparency mode : <code>NONE</code><br> transparency value : 0.0<br> source blend function : <code>BLEND_SRC_ALPHA</code><br> destination blend function : <code>BLEND_ONE_MINUS_SRC_ALPHA</code><br> </ul><P></DL><HR><A NAME="TransparencyAttributes(int, float)"><!-- --></A><H3>TransparencyAttributes</H3><PRE>public <B>TransparencyAttributes</B>(int tMode, float tVal)</PRE><DL><DD>Construct TransparencyAttributes object with specified values.<P><DL><DT><B>Parameters:</B><DD><CODE>tMode</CODE> - the transparency mode<DD><CODE>tVal</CODE> - the transparency value<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if <code>tMode</code> is a value other than <code>NONE</code>, <code>FASTEST</code>, <code>NICEST</code>, <code>SCREEN_DOOR</code>, or <code>BLENDED</code></DL></DL><HR><A NAME="TransparencyAttributes(int, float, int, int)"><!-- --></A><H3>TransparencyAttributes</H3><PRE>public <B>TransparencyAttributes</B>(int tMode, float tVal, int srcBlendFunction,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -