quadcurve2d.html
来自「API資料大全」· HTML 代码 · 共 1,297 行 · 第 1/4 页
HTML
1,297 行
double[] right, int rightoff)</PRE><DL><DD>Subdivides the quadratic curve specified by the coordinates stored in the <code>src</code> array at indices <code>srcoff</code> through <code>srcoff</code> + 5 and stores the resulting two subdivided curves into the two result arrays at the corresponding indices. Either or both of the <code>left</code> and <code>right</code> arrays can be <code>null</code> or a reference to the same array and offset as the <code>src</code> array. Note that the last point in the first subdivided curve is the same as the first point in the second subdivided curve. Thus, it is possible to pass the same array for <code>left</code> and <code>right</code> and to use offsets such that <code>rightoff</code> equals <code>leftoff</code> + 4 in order to avoid allocating extra storage for this common point.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>src</CODE> - the array holding the coordinates for the source curve<DD><CODE>srcoff</CODE> - the offset into the array of the beginning of the the 6 source coordinates<DD><CODE>left</CODE> - the array for storing the coordinates for the first half of the subdivided curve<DD><CODE>leftoff</CODE> - the offset into the array of the beginning of the the 6 left coordinates<DD><CODE>right</CODE> - the array for storing the coordinates for the second half of the subdivided curve<DD><CODE>rightoff</CODE> - the offset into the array of the beginning of the the 6 right coordinates</DL></DD></DL><HR><A NAME="solveQuadratic(double[])"><!-- --></A><H3>solveQuadratic</H3><PRE>public static int <B>solveQuadratic</B>(double[] eqn)</PRE><DL><DD>Solves the quadratic whose coefficients are in the <code>eqn</code> array and places the non-complex roots back into the same array, returning the number of roots. The quadratic solved is represented by the equation: <pre> eqn = {C, B, A}; ax^2 + bx + c = 0 </pre> A return value of <code>-1</code> is used to distinguish a constant equation, which might be always 0 or never 0, from an equation that has no zeroes.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>equ</CODE> - the array that contains the quadratic coefficients<DT><B>Returns:</B><DD>the number of roots, or <code>-1</code> if the equation is a constant</DL></DD></DL><HR><A NAME="solveQuadratic(double[], double[])"><!-- --></A><H3>solveQuadratic</H3><PRE>public static int <B>solveQuadratic</B>(double[] eqn, double[] res)</PRE><DL><DD>Solves the quadratic whose coefficients are in the <code>eqn</code> array and places the non-complex roots into the <code>res</code> array, returning the number of roots. The quadratic solved is represented by the equation: <pre> eqn = {C, B, A}; ax^2 + bx + c = 0 </pre> A return value of <code>-1</code> is used to distinguish a constant equation, which might be always 0 or never 0, from an equation that has no zeroes.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of roots, or <code>-1</code> if the equation is a constant.</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 the shape of this <code>QuadCurve2D</code>.<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 specified coordinates<DT><B>Returns:</B><DD><code>true</code> if the specified coordinate is inside the boundary of the shape of this <code>QuadCurve2D</code>; <code>false</code> otherwise.</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 specified <code>Point2D</code> is inside the boundary of the shape of this <code>QuadCurve2D</code>.<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><DT><B>Returns:</B><DD><code>true</code> if the specified <code>Point2D</code> is inside the boundary of the shape of this <code>QuadCurve2D</code>.</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 the shape of this <code>QuadCurve2D</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 upper-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 the shape of this <code>QuadCurve2D</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 the shape of this <code>QuadCurve2D</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><DT><B>Returns:</B><DD><code>true</code> if the shape of this <code>QuadCurve2D</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 the shape of this <code>QuadCurve2D</code> entirely contains the specified set of rectangular coordinates.<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 upper-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 the interior of the shape of this <code>QuadCurve2D</code> entirely contains the specified rectangluar area; <code>false</code> otherwise.</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 the shape of this <code>QuadCurve2D</code> entirely contains the specified <code>Rectangle2D</code>.<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><DT><B>Returns:</B><DD><code>true</code> if the interior of the shape of this <code>QuadCurve2D</code> entirely contains the specified <code>Rectangle2D</code>; <code>false</code> otherwise.</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>QuadCurve2D</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 shape of this <code>QuadCurve2D</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 the shape of this <code>QuadCurve2D</code>. The iterator for this class is not multi-threaded safe, which means that this <code>QuadCurve2D</code> class does not guarantee that modifications to the geometry of this <code>QuadCurve2D</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> - an optional <A HREF="../../../java/awt/geom/AffineTransform.html"><CODE>AffineTransform</CODE></A> to apply to the shape boundary<DT><B>Returns:</B><DD>a <A HREF="../../../java/awt/geom/PathIterator.html"><CODE>PathIterator</CODE></A> object that defines the boundary of the shape.</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 the flattened shape of this <code>QuadCurve2D</code>. The iterator for this class is not multi-threaded safe, which means that this <code>QuadCurve2D</code> class does not guarantee that modifications to the geometry of this <code>QuadCurve2D</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> - an optional <code>AffineTransform</code> to apply to the boundary of the shape<DD><CODE>flatness</CODE> - the maximum distance that the control points for a subdivided curve can be with respect to a line connecting the endpoints of this curve before this curve is replaced by a straight line connecting the endpoints.<DT><B>Returns:</B><DD>a <code>PathIterator</code> object that defines the flattened boundary of the shape.</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 and with the same contents 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/QuadCurve2D.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/Point2D.Float.html"><B>PREV CLASS</B></A> <A HREF="../../../java/awt/geom/QuadCurve2D.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="QuadCurve2D.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 + -
显示快捷键?