cubiccurve2d.html
来自「API資料大全」· HTML 代码 · 共 1,359 行 · 第 1/4 页
HTML
1,359 行
subdivide</H3><PRE>public static void <B>subdivide</B>(<A HREF="../../../java/awt/geom/CubicCurve2D.html">CubicCurve2D</A> src, <A HREF="../../../java/awt/geom/CubicCurve2D.html">CubicCurve2D</A> left, <A HREF="../../../java/awt/geom/CubicCurve2D.html">CubicCurve2D</A> right)</PRE><DL><DD>Subdivides the cubic curve specified by the <code>src</code> parameter and stores the resulting two subdivided curves into the <code>left</code> and <code>right</code> curve parameters. Either or both of the <code>left</code> and <code>right</code> objects may be the same as the <code>src</code> object or <code>null</code>.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>src</CODE> - the cubic curve to be subdivided<DD><CODE>left</CODE> - the cubic curve object for storing the left or first half of the subdivided curve<DD><CODE>right</CODE> - the cubic curve object for storing the right or second half of the subdivided curve</DL></DD></DL><HR><A NAME="subdivide(double[], int, double[], int, double[], int)"><!-- --></A><H3>subdivide</H3><PRE>public static void <B>subdivide</B>(double[] src, int srcoff, double[] left, int leftoff, double[] right, int rightoff)</PRE><DL><DD>Subdivides the cubic curve specified by the coordinates stored in the <code>src</code> array at indices <code>srcoff</code> through (<code>srcoff</code> + 7) 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 may be <code>null</code> or a reference to the same array 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 as <code>rightoff</code> equals (<code>leftoff</code> + 6), 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="solveCubic(double[])"><!-- --></A><H3>solveCubic</H3><PRE>public static int <B>solveCubic</B>(double[] eqn)</PRE><DL><DD>Solves the cubic 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 solved cubic is represented by the equation: <pre> eqn = {c, b, a, d} dx^3 + ax^2 + bx + c = 0 </pre> A return value of -1 is used to distinguish a constant equation that 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>eqn</CODE> - an array containing coefficients for a cubic<DT><B>Returns:</B><DD>the number of roots, or -1 if the equation is a constant.</DL></DD></DL><HR><A NAME="solveCubic(double[], double[])"><!-- --></A><H3>solveCubic</H3><PRE>public static int <B>solveCubic</B>(double[] eqn, double[] res)</PRE><DL><DD>Solve the cubic whose coefficients are in the <code>eqn</code> array and place the non-complex roots into the <code>res</code> array, returning the number of roots. The cubic solved is represented by the equation: eqn = {c, b, a, d} dx^3 + ax^2 + bx + c = 0 A return value of -1 is used to distinguish a constant equation, which may be always 0 or never 0, from an equation which has no zeroes.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of roots, or -1 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.<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 coordinate to be tested<DT><B>Returns:</B><DD><code>true</code> if the coordinate is inside the boundary of the shape; <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.<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>true</code> if the <code>p</code> is inside the boundary of the shape; <code>false</code> otherwise.</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 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 intersects the interior of the specified rectangular area; <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 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 the shape 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 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 shape<DD><CODE>w</CODE> - the width of the specified rectangular shape<DD><CODE>h</CODE> - the height of the specified rectangular shape<DT><B>Returns:</B><DD><code>true</code> if the shape entirely contains the specified set of rectangular coordinates; <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 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> to be tested<DT><B>Returns:</B><DD><code>true</code> if the shape 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 the shape.<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.</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. The iterator for this class is not multi-threaded safe, which means that this <code>CubicCurve2D</code> class does not guarantee that modifications to the geometry of this <code>CubicCurve2D</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 <code>AffineTransform</code> to be applied to the coordinates as they are returned in the iteration, or <code>null</code> if untransformed coordinates are desired<DT><B>Returns:</B><DD>the <code>PathIterator</code> object that returns the geometry of the outline of this <code>CubicCurve2D</code>, one segment at a time.</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>Return an iteration object that defines the boundary of the flattened shape. The iterator for this class is not multi-threaded safe, which means that this <code>CubicCurve2D</code> class does not guarantee that modifications to the geometry of this <code>CubicCurve2D</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 be applied to the coordinates as they are returned in the iteration, or <code>null</code> if untransformed coordinates are desired<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<DT><B>Returns:</B><DD>the <code>PathIterator</code> object that returns the geometry of the outline of this <code>CubicCurve2D</code>, one segment at a time.</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/CubicCurve2D.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/Area.html"><B>PREV CLASS</B></A> <A HREF="../../../java/awt/geom/CubicCurve2D.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="CubicCurve2D.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 + -
显示快捷键?