📄 lineattributes.html
字号:
<!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:05 PST 2006 --><TITLE>LineAttributes (Java 3D 1.5.0)</TITLE><META NAME="keywords" CONTENT="javax.media.j3d.LineAttributes class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="LineAttributes (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> </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="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-all.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></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/media/j3d/LineArray.html" title="class in javax.media.j3d"><B>PREV CLASS</B></A> <A HREF="../../../javax/media/j3d/LineStripArray.html" title="class 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/LineAttributes.html" target="_top"><B>FRAMES</B></A> <A HREF="LineAttributes.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | <A HREF="#field_summary">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: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <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 LineAttributes</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.LineAttributes</B></PRE><HR><DL><DT><PRE>public class <B>LineAttributes</B><DT>extends <A HREF="../../../javax/media/j3d/NodeComponent.html" title="class in javax.media.j3d">NodeComponent</A></DL></PRE><P>The LineAttributes object defines all rendering state that can be set as a component object of a Shape3D node. The line attributes that can be defined are:<P> <UL><LI>Pattern - specifies the pattern used to draw the line:<p> <ul> <li>PATTERN_SOLID - draws a solid line with no pattern. This is the default.</li> <p> <li>PATTERN_DASH - draws dashed lines. Ideally, these will be drawn with a repeating pattern of 8 pixels on and 8 pixels off.</li> <p> <li>PATTERN_DOT - draws dotted lines. Ideally, these will be drawn with a repeating pattern of 1 pixel on and 7 pixels off.</li> <p> <li>PATTERN_DASH_DOT - draws dashed-dotted lines. Ideally, these will be drawn with a repeating pattern of 7 pixels on, 4 pixels off, 1 pixel on, and 4 pixels off.</li> <p> <li>PATTERN_USER_DEFINED - draws lines with a user-defined line pattern. See "User-defined Line Patterns," below.</li><p> </ul> <p> <LI>Antialiasing (enabled or disabled). By default, antialiasing is disabled.</LI> <p> <p> If antialiasing is enabled, the lines are considered transparent for rendering purposes. They are rendered with all the other transparent objects and adhere to the other transparency settings such as the View transparency sorting policy and the View depth buffer freeze transparent enable. </p> <LI>Width (in pixels). The default is a line width of one pixel. </LI></UL><p> <b>User-defined Line Patterns</b> <p> A user-defined line pattern is specified with a pattern mask and an optional scale factor. <p> The Pattern Mask<p> The pattern is specified using a 16-bit mask that specifies on and off segments. Bit 0 in the pattern mask corresponds to the first pixel of the line or line strip primitive. A value of 1 for a bit in the pattern mask indicates that the corresponding pixel is drawn, while a value of 0 indicates that the corresponding pixel is not drawn. After all 16 bits in the pattern are used, the pattern is repeated. <p> For example, a mask of 0x00ff defines a dashed line with a repeating pattern of 8 pixels on followed by 8 pixels off. A value of 0x0101 defines a a dotted line with a repeating pattern of 1 pixel on and 7 pixels off. <p> The pattern continues around individual line segments of a line strip primitive. It is restarted at the beginning of each new line strip. For line array primitives, the pattern is restarted at the beginning of each line. <p> The Scale Factor <p> The pattern is multiplied by the scale factor such that each bit in the pattern mask corresponds to that many consecutive pixels. For example, a scale factor of 3 applied to a pattern mask of 0x001f would produce a repeating pattern of 15 pixels on followed by 33 pixels off. The valid range for this attribute is [1,15]. Values outside this range are clamped.<p><P><P><DL><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/Appearance.html" title="class in javax.media.j3d"><CODE>Appearance</CODE></A>, <A HREF="../../../javax/media/j3d/View.html" title="class in javax.media.j3d"><CODE>View</CODE></A></DL><HR><P><!-- =========== 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 int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/LineAttributes.html#ALLOW_ANTIALIASING_READ">ALLOW_ANTIALIASING_READ</A></B></CODE><BR> Specifies that this LineAttributes object allows reading its line antialiasing flag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/LineAttributes.html#ALLOW_ANTIALIASING_WRITE">ALLOW_ANTIALIASING_WRITE</A></B></CODE><BR> Specifies that this LineAttributes object allows writing its line antialiasing flag.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/LineAttributes.html#ALLOW_PATTERN_READ">ALLOW_PATTERN_READ</A></B></CODE><BR> Specifies that this LineAttributes object allows reading its line pattern information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/LineAttributes.html#ALLOW_PATTERN_WRITE">ALLOW_PATTERN_WRITE</A></B></CODE><BR> Specifies that this LineAttributes object allows writing its line pattern information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/LineAttributes.html#ALLOW_WIDTH_READ">ALLOW_WIDTH_READ</A></B></CODE><BR> Specifies that this LineAttributes object allows reading its line width information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/LineAttributes.html#ALLOW_WIDTH_WRITE">ALLOW_WIDTH_WRITE</A></B></CODE><BR> Specifies that this LineAttributes object allows writing its line width information.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/LineAttributes.html#PATTERN_DASH">PATTERN_DASH</A></B></CODE><BR> Draw dashed lines.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/LineAttributes.html#PATTERN_DASH_DOT">PATTERN_DASH_DOT</A></B></CODE><BR> Draw dashed-dotted lines.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/LineAttributes.html#PATTERN_DOT">PATTERN_DOT</A></B></CODE><BR> Draw dotted lines.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/LineAttributes.html#PATTERN_SOLID">PATTERN_SOLID</A></B></CODE><BR> Draw solid lines with no pattern.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/LineAttributes.html#PATTERN_USER_DEFINED">PATTERN_USER_DEFINED</A></B></CODE><BR> Draw lines with a user-defined line pattern.</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_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>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/media/j3d/LineAttributes.html#LineAttributes()">LineAttributes</A></B>()</CODE><BR> Constructs a LineAttributes object with default parameters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../javax/media/j3d/LineAttributes.html#LineAttributes(float, int, boolean)">LineAttributes</A></B>(float lineWidth, int linePattern, boolean lineAntialiasing)</CODE><BR> Constructs a LineAttributes object with specified values.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_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">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -