line2d.html

来自「API資料大全」· HTML 代码 · 共 1,339 行 · 第 1/4 页

HTML
1,339
字号
<CODE>static&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Line2D.html#ptLineDist(double, double, double, double, double, double)">ptLineDist</A></B>(double&nbsp;X1,           double&nbsp;Y1,           double&nbsp;X2,           double&nbsp;Y2,           double&nbsp;PX,           double&nbsp;PY)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the distance from a point to a line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Line2D.html#ptLineDist(java.awt.geom.Point2D)">ptLineDist</A></B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A>&nbsp;pt)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the distance from a <code>Point2D</code> to this line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Line2D.html#ptLineDistSq(double, double)">ptLineDistSq</A></B>(double&nbsp;PX,             double&nbsp;PY)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the square of the distance from a point to this line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Line2D.html#ptLineDistSq(double, double, double, double, double, double)">ptLineDistSq</A></B>(double&nbsp;X1,             double&nbsp;Y1,             double&nbsp;X2,             double&nbsp;Y2,             double&nbsp;PX,             double&nbsp;PY)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the square of the distance from a point to a line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Line2D.html#ptLineDistSq(java.awt.geom.Point2D)">ptLineDistSq</A></B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A>&nbsp;pt)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the square of the distance from a specified  <code>Point2D</code> to this line.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Line2D.html#ptSegDist(double, double)">ptSegDist</A></B>(double&nbsp;PX,          double&nbsp;PY)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the distance from a point to this line segment.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Line2D.html#ptSegDist(double, double, double, double, double, double)">ptSegDist</A></B>(double&nbsp;X1,          double&nbsp;Y1,          double&nbsp;X2,          double&nbsp;Y2,          double&nbsp;PX,          double&nbsp;PY)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the distance from a point to a line segment.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Line2D.html#ptSegDist(java.awt.geom.Point2D)">ptSegDist</A></B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A>&nbsp;pt)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the distance from a <code>Point2D</code> to this line segment.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Line2D.html#ptSegDistSq(double, double)">ptSegDistSq</A></B>(double&nbsp;PX,            double&nbsp;PY)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the square of the distance from a point to this line segment.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Line2D.html#ptSegDistSq(double, double, double, double, double, double)">ptSegDistSq</A></B>(double&nbsp;X1,            double&nbsp;Y1,            double&nbsp;X2,            double&nbsp;Y2,            double&nbsp;PX,            double&nbsp;PY)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the square of the distance from a point to a line segment.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Line2D.html#ptSegDistSq(java.awt.geom.Point2D)">ptSegDistSq</A></B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A>&nbsp;pt)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the square of the distance from a <code>Point2D</code> to  this line segment.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Line2D.html#relativeCCW(double, double)">relativeCCW</A></B>(double&nbsp;PX,            double&nbsp;PY)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an indicator of where the specified point  (PX,&nbsp;PY) lies with respect to this line segment.</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="../../../java/awt/geom/Line2D.html#relativeCCW(double, double, double, double, double, double)">relativeCCW</A></B>(double&nbsp;X1,            double&nbsp;Y1,            double&nbsp;X2,            double&nbsp;Y2,            double&nbsp;PX,            double&nbsp;PY)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an indicator of where the specified point  (PX,&nbsp;PY) lies with respect to the line segment from  (X1,&nbsp;Y1) to (X2,&nbsp;Y2).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Line2D.html#relativeCCW(java.awt.geom.Point2D)">relativeCCW</A></B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A>&nbsp;p)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an indicator of where the specified <code>Point2D</code> lies with respect to this line segment.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Line2D.html#setLine(double, double, double, double)">setLine</A></B>(double&nbsp;X1,        double&nbsp;Y1,        double&nbsp;X2,        double&nbsp;Y2)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the location of the endpoints of this <code>Line2D</code> to the specified double coordinates.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Line2D.html#setLine(java.awt.geom.Line2D)">setLine</A></B>(<A HREF="../../../java/awt/geom/Line2D.html">Line2D</A>&nbsp;l)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the location of the endpoints of this <code>Line2D</code> to the same as those endpoints of the specified <code>Line2D</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Line2D.html#setLine(java.awt.geom.Point2D, java.awt.geom.Point2D)">setLine</A></B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A>&nbsp;p1,        <A HREF="../../../java/awt/geom/Point2D.html">Point2D</A>&nbsp;p2)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the location of the endpoints of this <code>Line2D</code> to the specified <code>Point2D</code> coordinates.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../../java/lang/Object.html#toString()">toString</A>, <A HREF="../../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.awt.Shape"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface java.awt.<A HREF="../../../java/awt/Shape.html">Shape</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/awt/Shape.html#getBounds2D()">getBounds2D</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Line2D()"><!-- --></A><H3>Line2D</H3><PRE>protected <B>Line2D</B>()</PRE><DL><DD>This is an abstract class that cannot be instantiated directly. Type-specific implementation subclasses are available for instantiation and provide a number of formats for storing the information necessary to satisfy the various accessory methods below.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/geom/Line2D.Float.html"><CODE>Line2D.Float</CODE></A>, <A HREF="../../../java/awt/geom/Line2D.Double.html"><CODE>Line2D.Double</CODE></A></DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getX1()"><!-- --></A><H3>getX1</H3><PRE>public abstract double <B>getX1</B>()</PRE><DL><DD>Returns the X coordinate of the start point in double precision.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the X coordinate of this <code>Line2D</code> object's 	    starting point.</DL></DD></DL><HR><A NAME="getY1()"><!-- --></A><H3>getY1</H3><PRE>public abstract double <B>getY1</B>()</PRE><DL><DD>Returns the Y coordinate of the start point in double precision.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the Y coordinate of this <code>Line2D</code> object's 	    starting point.</DL></DD></DL><HR><A NAME="getP1()"><!-- --></A><H3>getP1</H3><PRE>public abstract <A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> <B>getP1</B>()</PRE><DL><DD>Returns the starting <code>Point2D</code> of this <code>Line2D</code>.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the starting <code>Point2D</code> of this		<code>Line2D</code>.</DL></DD></DL><HR><A NAME="getX2()"><!-- --></A><H3>getX2</H3><PRE>public abstract double <B>getX2</B>()</PRE><DL><DD>Returns the X coordinate of the end point in double precision.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the X coordinate of this <code>Line2D</code> object's 	    starting point.</DL></DD></DL><HR><A NAME="getY2()"><!-- --></A><H3>getY2</H3><PRE>public abstract double <B>getY2</B>()</PRE><DL><DD>Returns the Y coordinate of the end point in double precision.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the Y coordinate of this <code>Line2D</code> object's       starting point.</DL></DD></DL><HR><A NAME="getP2()"><!-- --></A><H3>getP2</H3><PRE>public abstract <A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> <B>getP2</B>()</PRE><DL><DD>Returns the end <code>Point2D</code> of this <code>Line2D</code>.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a <code>Point2D</code> that is the endpoint of this 		<code>Line2D</code>.</DL></DD></DL><HR><A NAME="setLine(double, double, double, double)"><!-- --></A><H3>setLine</H3><PRE>public abstract void <B>setLine</B>(double&nbsp;X1,                             double&nbsp;Y1,                             double&nbsp;X2,                             double&nbsp;Y2)</PRE>

⌨️ 快捷键说明

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