line2d.html
来自「API資料大全」· HTML 代码 · 共 1,339 行 · 第 1/4 页
HTML
1,339 行
<HR><A NAME="ptLineDist(double, double, double, double, double, double)"><!-- --></A><H3>ptLineDist</H3><PRE>public static double <B>ptLineDist</B>(double X1, double Y1, double X2, double Y2, double PX, double PY)</PRE><DL><DD>Returns the distance from a point to a line.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>X1, Y1</CODE> - the coordinates of the beginning of the specified line segment<DD><CODE>X2, Y2</CODE> - the coordinates of the end of the specified line segment<DD><CODE>PX, PY</CODE> - the coordinates of the specified point being measured<DT><B>Returns:</B><DD>a double value that is the distance from a specified point to a specified line segment.</DL></DD></DL><HR><A NAME="ptLineDistSq(double, double)"><!-- --></A><H3>ptLineDistSq</H3><PRE>public double <B>ptLineDistSq</B>(double PX, double PY)</PRE><DL><DD>Returns the square of the distance from a point to this line.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>PX, PY</CODE> - the coordinates of the specified point being measured<DT><B>Returns:</B><DD>a double value that is the square of the distance from a specified point to the current line segment.</DL></DD></DL><HR><A NAME="ptLineDistSq(java.awt.geom.Point2D)"><!-- --></A><H3>ptLineDistSq</H3><PRE>public double <B>ptLineDistSq</B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> pt)</PRE><DL><DD>Returns the square of the distance from a specified <code>Point2D</code> to this line.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pt</CODE> - the specified <code>Point2D</code> being measured<DT><B>Returns:</B><DD>a double value that is the square of the distance from a specified <code>Point2D</code> to the current line segment.</DL></DD></DL><HR><A NAME="ptLineDist(double, double)"><!-- --></A><H3>ptLineDist</H3><PRE>public double <B>ptLineDist</B>(double PX, double PY)</PRE><DL><DD>Returns the distance from a point to this line.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>PX, PY</CODE> - the coordinates of the specified point being measured<DT><B>Returns:</B><DD>a double value that is the distance from a specified point to the current line segment.</DL></DD></DL><HR><A NAME="ptLineDist(java.awt.geom.Point2D)"><!-- --></A><H3>ptLineDist</H3><PRE>public double <B>ptLineDist</B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> pt)</PRE><DL><DD>Returns the distance from a <code>Point2D</code> to this line.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>pt</CODE> - the specified <code>Point2D</code> being measured<DT><B>Returns:</B><DD>a double value that is the distance from a specified <code>Point2D</code> to the current line segment.</DL></DD></DL><HR><A NAME="contains(double, double)"><!-- --></A><H3>contains</H3><PRE>public boolean <B>contains</B>(double x, double y)</PRE><DL><DD>Tests if a specified coordinate is inside the boundary of this <code>Line2D</code>. This method is required to implement the <A HREF="../../../java/awt/Shape.html"><CODE>Shape</CODE></A> interface, but in the case of <code>Line2D</code> objects it always returns <code>false</code> since a line contains no area.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/Shape.html#contains(double, double)">contains</A></CODE> in interface <CODE><A HREF="../../../java/awt/Shape.html">Shape</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>x, y</CODE> - the coordinates of the specified point<DT><B>Returns:</B><DD><code>false</code> because a <code>Line2D</code> contains no area.</DL></DD></DL><HR><A NAME="contains(java.awt.geom.Point2D)"><!-- --></A><H3>contains</H3><PRE>public boolean <B>contains</B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> p)</PRE><DL><DD>Tests if a given <code>Point2D</code> is inside the boundary of this <code>Line2D</code>. This method is required to implement the <code>Shape</code> interface, but in the case of <code>Line2D</code> objects it always returns <code>false</code> since a line contains no area.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/Shape.html#contains(java.awt.geom.Point2D)">contains</A></CODE> in interface <CODE><A HREF="../../../java/awt/Shape.html">Shape</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>p</CODE> - the specified <code>Point2D</code> to be tested<DT><B>Returns:</B><DD><code>false</code> because a <code>Line2D</code> contains no area.</DL></DD></DL><HR><A NAME="intersects(double, double, double, double)"><!-- --></A><H3>intersects</H3><PRE>public boolean <B>intersects</B>(double x, double y, double w, double h)</PRE><DL><DD>Tests if this <code>Line2D</code> intersects the interior of a specified set of rectangular coordinates.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/Shape.html#intersects(double, double, double, double)">intersects</A></CODE> in interface <CODE><A HREF="../../../java/awt/Shape.html">Shape</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>x, y</CODE> - the coordinates of the top-left corner of the specified rectangular area<DD><CODE>w</CODE> - the width of the specified rectangular area<DD><CODE>h</CODE> - the height of the specified rectangular area<DT><B>Returns:</B><DD><code>true</code> if this <code>Line2D</code> intersects the interior of the specified set of rectangular coordinates; <code>false</code> otherwise.</DL></DD></DL><HR><A NAME="intersects(java.awt.geom.Rectangle2D)"><!-- --></A><H3>intersects</H3><PRE>public boolean <B>intersects</B>(<A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> r)</PRE><DL><DD>Tests if this <code>Line2D</code> intersects the interior of a specified <code>Rectangle2D</code>.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/Shape.html#intersects(java.awt.geom.Rectangle2D)">intersects</A></CODE> in interface <CODE><A HREF="../../../java/awt/Shape.html">Shape</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the specified <code>Rectangle2D</code> to be tested<DT><B>Returns:</B><DD><code>true</code> if this <code>Line2D</code> intersects the interior of the specified <code>Rectangle2D</code>; <code>false</code> otherwise.</DL></DD></DL><HR><A NAME="contains(double, double, double, double)"><!-- --></A><H3>contains</H3><PRE>public boolean <B>contains</B>(double x, double y, double w, double h)</PRE><DL><DD>Tests if the interior of this <code>Line2D</code> entirely contains the specified set of rectangular coordinates. This method is required to implement the <code>Shape</code> interface, but in the case of <code>Line2D</code> objects it always returns false since a line contains no area.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/Shape.html#contains(double, double, double, double)">contains</A></CODE> in interface <CODE><A HREF="../../../java/awt/Shape.html">Shape</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>x, y</CODE> - the coordinates of the top-left corner of the specified rectangular area<DD><CODE>w</CODE> - the width of the specified rectangular area<DD><CODE>h</CODE> - the height of the specified rectangular area<DT><B>Returns:</B><DD><code>false</code> because a <code>Line2D</code> contains no area.</DL></DD></DL><HR><A NAME="contains(java.awt.geom.Rectangle2D)"><!-- --></A><H3>contains</H3><PRE>public boolean <B>contains</B>(<A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> r)</PRE><DL><DD>Tests if the interior of this <code>Line2D</code> entirely contains the specified <code>Rectangle2D</code>. This method is required to implement the <code>Shape</code> interface, but in the case of <code>Line2D</code> objects it always returns <code>false</code> since a line contains no area.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/Shape.html#contains(java.awt.geom.Rectangle2D)">contains</A></CODE> in interface <CODE><A HREF="../../../java/awt/Shape.html">Shape</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the specified <code>Rectangle2D</code> to be tested<DT><B>Returns:</B><DD><code>false</code> because a <code>Line2D</code> contains no area.</DL></DD></DL><HR><A NAME="getBounds()"><!-- --></A><H3>getBounds</H3><PRE>public <A HREF="../../../java/awt/Rectangle.html">Rectangle</A> <B>getBounds</B>()</PRE><DL><DD>Returns the bounding box of this <code>Line2D</code>.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/Shape.html#getBounds()">getBounds</A></CODE> in interface <CODE><A HREF="../../../java/awt/Shape.html">Shape</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a <A HREF="../../../java/awt/Rectangle.html"><CODE>Rectangle</CODE></A> that is the bounding box of the <code>Line2D</code>.</DL></DD></DL><HR><A NAME="getPathIterator(java.awt.geom.AffineTransform)"><!-- --></A><H3>getPathIterator</H3><PRE>public <A HREF="../../../java/awt/geom/PathIterator.html">PathIterator</A> <B>getPathIterator</B>(<A HREF="../../../java/awt/geom/AffineTransform.html">AffineTransform</A> at)</PRE><DL><DD>Returns an iteration object that defines the boundary of this <code>Line2D</code>. The iterator for this class is not multi-threaded safe, which means that this <code>Line2D</code> class does not guarantee that modifications to the geometry of this <code>Line2D</code> object do not affect any iterations of that geometry that are already in process.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/Shape.html#getPathIterator(java.awt.geom.AffineTransform)">getPathIterator</A></CODE> in interface <CODE><A HREF="../../../java/awt/Shape.html">Shape</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>at</CODE> - the specified <A HREF="../../../java/awt/geom/AffineTransform.html"><CODE>AffineTransform</CODE></A><DT><B>Returns:</B><DD>a <A HREF="../../../java/awt/geom/PathIterator.html"><CODE>PathIterator</CODE></A> that defines the boundary of this <code>Line2D</code>.</DL></DD></DL><HR><A NAME="getPathIterator(java.awt.geom.AffineTransform, double)"><!-- --></A><H3>getPathIterator</H3><PRE>public <A HREF="../../../java/awt/geom/PathIterator.html">PathIterator</A> <B>getPathIterator</B>(<A HREF="../../../java/awt/geom/AffineTransform.html">AffineTransform</A> at, double flatness)</PRE><DL><DD>Returns an iteration object that defines the boundary of this flattened <code>Line2D</code>. The iterator for this class is not multi-threaded safe, which means that this <code>Line2D</code> class does not guarantee that modifications to the geometry of this <code>Line2D</code> object do not affect any iterations of that geometry that are already in process.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../../java/awt/Shape.html#getPathIterator(java.awt.geom.AffineTransform, double)">getPathIterator</A></CODE> in interface <CODE><A HREF="../../../java/awt/Shape.html">Shape</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>at</CODE> - the specified <code>AffineTransform</code><DD><CODE>flatness</CODE> - the maximum amount that the control points for a given curve can vary from colinear before a subdivided curve is replaced by a straight line connecting the endpoints. Since a <code>Line2D</code> object is always flat, this parameter is ignored.<DT><B>Returns:</B><DD>a <code>PathIterator</code> that defines the boundary of the flattened <code>Line2D</code></DL></DD></DL><HR><A NAME="clone()"><!-- --></A><H3>clone</H3><PRE>public <A HREF="../../../java/lang/Object.html">Object</A> <B>clone</B>()</PRE><DL><DD>Creates a new object of the same class as this object.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/lang/Object.html#clone()">clone</A></CODE> in class <CODE><A HREF="../../../java/lang/Object.html">Object</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a clone of this instance.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/OutOfMemoryError.html">OutOfMemoryError</A></CODE> - if there is not enough memory.<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><A HREF="../../../java/lang/Cloneable.html"><CODE>Cloneable</CODE></A></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_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/Line2D.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/geom/GeneralPath.html"><B>PREV CLASS</B></A> <A HREF="../../../java/awt/geom/Line2D.Double.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="Line2D.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: <A HREF="#inner_class_summary">INNER</A> | FIELD | <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><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?