arc2d.html
来自「API資料大全」· HTML 代码 · 共 1,037 行 · 第 1/4 页
HTML
1,037 行
double y1, double x2, double y2)</PRE><DL><DD>Sets the starting angle and angular extent of this arc using two sets of coordinates. The first set of coordinates is used to determine the angle of the starting point relative to the arc's center. The second set of coordinates is used to determine the angle of the end point relative to the arc's center. The arc will always be non-empty and extend counterclockwise from the first point around to the second point.<DD><DL><DT><B>Parameters:</B><DD><CODE>x1, y1</CODE> - The coordinates of the arc's starting point.<DD><CODE>x2, y2</CODE> - The coordinates of the arc's ending point.</DL></DD></DL><HR><A NAME="setAngles(java.awt.geom.Point2D, java.awt.geom.Point2D)"><!-- --></A><H3>setAngles</H3><PRE>public void <B>setAngles</B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> p1, <A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> p2)</PRE><DL><DD>Sets the starting angle and angular extent of this arc using two points. The first point is used to determine the angle of the starting point relative to the arc's center. The second point is used to determine the angle of the end point relative to the arc's center. The arc will always be non-empty and extend counterclockwise from the first point around to the second point.<DD><DL><DT><B>Parameters:</B><DD><CODE>p1</CODE> - The <CODE>Point2D</CODE> that defines the arc's starting point.<DD><CODE>p2</CODE> - The <CODE>Point2D</CODE> that defines the arc's ending point.</DL></DD></DL><HR><A NAME="setArcType(int)"><!-- --></A><H3>setArcType</H3><PRE>public void <B>setArcType</B>(int type)</PRE><DL><DD>Sets the closure type of this arc to the specified value: <CODE>OPEN</CODE>, <CODE>CHORD</CODE>, or <CODE>PIE</CODE>.<DD><DL><DT><B>Parameters:</B><DD><CODE>type</CODE> - The integer constant that represents the closure type of this arc: <A HREF="../../../java/awt/geom/Arc2D.html#OPEN"><CODE>OPEN</CODE></A>, <A HREF="../../../java/awt/geom/Arc2D.html#CHORD"><CODE>CHORD</CODE></A>, or <A HREF="../../../java/awt/geom/Arc2D.html#PIE"><CODE>PIE</CODE></A>.<DT><B>Throws:</B><DD><CODE><A HREF="../../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if <code>type</code> is not 0, 1, or 2.+</DL></DD></DL><HR><A NAME="setFrame(double, double, double, double)"><!-- --></A><H3>setFrame</H3><PRE>public void <B>setFrame</B>(double x, double y, double w, double h)</PRE><DL><DD>Sets the location and size of the outer bounds of this arc to the specified values.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/geom/RectangularShape.html#setFrame(double, double, double, double)">setFrame</A></CODE> in class <CODE><A HREF="../../../java/awt/geom/RectangularShape.html">RectangularShape</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>x, y</CODE> - The coordinates of the upper left corner of the arc's bounding box. (Specified in double precision.)<DD><CODE>w</CODE> - The width of the arc's bounding box. (Specified in double precision.)<DD><CODE>h</CODE> - The height of the arc's bounding box. (Specified in double precision.)</DL></DD></DL><HR><A NAME="getBounds2D()"><!-- --></A><H3>getBounds2D</H3><PRE>public <A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> <B>getBounds2D</B>()</PRE><DL><DD>Returns the high-precision bounding box of the arc. The bounding box contains only the part of this <code>Arc2D</code> that is in between the starting and ending angles and contains the pie wedge, if this <code>Arc2D</code> has a <code>PIE</code> closure type. <p> This method differs from the <A HREF="../../../java/awt/geom/RectangularShape.html#getBounds()"><CODE>getBounds</CODE></A> in that the <code>getBounds</code> method only returns the bounds of the enclosing ellipse of this <code>Arc2D</code> without considering the starting and ending angles of this <code>Arc2D</code>.<DD><DL><DT><B>Returns:</B><DD>the <CODE>Rectangle2D</CODE> that represents the arc's bounding box.</DL></DD></DL><HR><A NAME="makeBounds(double, double, double, double)"><!-- --></A><H3>makeBounds</H3><PRE>protected abstract <A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> <B>makeBounds</B>(double x, double y, double w, double h)</PRE><DL><DD>Constructs a Rectangle2D of the appropriate precision to hold the parameters calculated to be the bounding box of this arc.<DD><DL><DT><B>Parameters:</B><DD><CODE>x, y</CODE> - The coordinates of the upper left corner of the bounding box. (Specified in double precision.)<DD><CODE>w</CODE> - The width of the bounding box. (Specified in double precision.)<DD><CODE>h</CODE> - The height of the bounding box. (Specified in double precision.)</DL></DD></DL><HR><A NAME="containsAngle(double)"><!-- --></A><H3>containsAngle</H3><PRE>public boolean <B>containsAngle</B>(double angle)</PRE><DL><DD>Determines whether or not the specified angle is within the angular extents of the arc.<DD><DL><DT><B>Parameters:</B><DD><CODE>angle</CODE> - The angle to test. (Specified in double precision.)<DT><B>Returns:</B><DD><CODE>true</CODE> if the arc contains the angle, <CODE>false</CODE> if the arc doesn't contain the angle.</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>Determines whether or not the specified point is inside the boundary of the arc.<DD><DL><DT><B>Parameters:</B><DD><CODE>x, y</CODE> - The coordinates of the point to test. (Specified in double precision.)<DT><B>Returns:</B><DD><CODE>true</CODE> if the point lies within the bound of the arc, <CODE>false</CODE> if the point lies outside of the arc's bounds.</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>Determines whether or not the interior of the arc intersects the interior of the specified rectangle.<DD><DL><DT><B>Parameters:</B><DD><CODE>x, y</CODE> - The coordinates of the rectangle's upper left corner. (Specified in double precision.)<DD><CODE>w</CODE> - The width of the rectangle. (Specified in double precision.)<DD><CODE>h</CODE> - The height of the rectangle. (Specified in double precision.)<DT><B>Returns:</B><DD><CODE>true</CODE> if the arc intersects the rectangle, <CODE>false</CODE> if the arc doesn't intersect the rectangle.</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>Determine whether or not the interior of the arc entirely contains the specified rectangle.<DD><DL><DT><B>Parameters:</B><DD><CODE>x, y</CODE> - The coordinates of the rectangle's upper left corner. (Specified in double precision.)<DD><CODE>w</CODE> - The width of the rectangle. (Specified in double precision.)<DD><CODE>h</CODE> - The height of the rectangle. (Specified in double precision.)<DT><B>Returns:</B><DD><CODE>true</CODE> if the arc contains the rectangle, <CODE>false</CODE> if the arc doesn't contain the rectangle.</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>Determine whether or not the interior of the arc entirely contains the specified rectangle.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../java/awt/geom/RectangularShape.html#contains(java.awt.geom.Rectangle2D)">contains</A></CODE> in class <CODE><A HREF="../../../java/awt/geom/RectangularShape.html">RectangularShape</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - The <CODE>Rectangle2D</CODE> to test.<DT><B>Returns:</B><DD><CODE>true</CODE> if the arc contains the rectangle, <CODE>false</CODE> if the arc doesn't contain the rectangle.</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 arc. This iterator is multithread safe. <code>Arc2D</code> guarantees that modifications to the geometry of the arc do not affect any iterations of that geometry that are already in process.<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 null if the untransformed coordinates are desired.<DT><B>Returns:</B><DD>A <CODE>PathIterator</CODE> that defines the arc's boundary.</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/Arc2D.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/AffineTransform.html"><B>PREV CLASS</B></A> <A HREF="../../../java/awt/geom/Arc2D.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="Arc2D.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> | <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><!-- =========== 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 + -
显示快捷键?