area.html

来自「API資料大全」· HTML 代码 · 共 853 行 · 第 1/3 页

HTML
853
字号
 box possible for the Shape.  The bounding box will not be padded to include the control points of curves in the outline of the Shape, but should tightly fit the actual geometry of the outline itself.  Since the returned object represents the bounding box with integers, the bounding box can only be as tight as the nearest integer coordinates that encompass the geometry 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>the bounding <code>Rectangle</code> for the <code>Area</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>Returns an exact copy of this <code>Area</code> 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>Created clone object</DL></DD></DL><HR><A NAME="equals(java.awt.geom.Area)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="../../../java/awt/geom/Area.html">Area</A>&nbsp;other)</PRE><DL><DD>Tests whether the geometries of the two <code>Area</code> objects are equal.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rhs</CODE> - the <code>Area</code> to be compared to this		<code>Area</code><DT><B>Returns:</B><DD><code>true</code> if the two geometries are equal;		<code>false</code> otherwise.</DL></DD></DL><HR><A NAME="transform(java.awt.geom.AffineTransform)"><!-- --></A><H3>transform</H3><PRE>public void <B>transform</B>(<A HREF="../../../java/awt/geom/AffineTransform.html">AffineTransform</A>&nbsp;t)</PRE><DL><DD>Transforms the geometry of this <code>Area</code> using the specified  <A HREF="../../../java/awt/geom/AffineTransform.html"><CODE>AffineTransform</CODE></A>.  The geometry is transformed in place, which  permanently changes the enclosed area defined by this object.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>t</CODE> - the transformation used to transform the area</DL></DD></DL><HR><A NAME="createTransformedArea(java.awt.geom.AffineTransform)"><!-- --></A><H3>createTransformedArea</H3><PRE>public <A HREF="../../../java/awt/geom/Area.html">Area</A> <B>createTransformedArea</B>(<A HREF="../../../java/awt/geom/AffineTransform.html">AffineTransform</A>&nbsp;t)</PRE><DL><DD>Creates a new <code>Area</code> object that contains the same geometry as this <code>Area</code> transformed by the specified <code>AffineTransform</code>.  This <code>Area</code> object  is unchanged.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>t</CODE> - the specified <code>AffineTransform</code> used to transform            the new <code>Area</code><DT><B>Returns:</B><DD>a new <code>Area</code> object representing the transformed            geometry.</DL></DD></DL><HR><A NAME="contains(double, double)"><!-- --></A><H3>contains</H3><PRE>public boolean <B>contains</B>(double&nbsp;x,                        double&nbsp;y)</PRE><DL><DD>Tests if a specifed point lies inside the boundary of this <code>Area</code> object.<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,&nbsp;y</CODE> - the specified point<DT><B>Returns:</B><DD><code>true</code> if the point lies completely within the             interior of the <code>Area</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>&nbsp;p)</PRE><DL><DD>Tests if a specified <A HREF="../../../java/awt/geom/Point2D.html"><CODE>Point2D</CODE></A> lies inside the boundary of the  this <code>Area</code> object.<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 <code>Point2D</code> to test<DT><B>Returns:</B><DD><code>true</code> if the specified <code>Point2D</code>		 lies completely within the interior of the <code>Area</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&nbsp;x,                        double&nbsp;y,                        double&nbsp;w,                        double&nbsp;h)</PRE><DL><DD>Tests whether or not the interior of this <code>Area</code> object completely contains the specified rectangular 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,&nbsp;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 specified rectangular area          lies completely within the interior of the <code>Area</code>;          <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>&nbsp;p)</PRE><DL><DD>Tests whether or not the interior of this <code>Area</code> object completely 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 <code>Rectangle2D</code> to test<DT><B>Returns:</B><DD><code>true</code> if the <code>Rectangle2D</code> lies             completely within the interior of the <code>Area</code>;            <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&nbsp;x,                          double&nbsp;y,                          double&nbsp;w,                          double&nbsp;h)</PRE><DL><DD>Tests whether the interior of this <code>Area</code> object intersects the interior of the specified rectangular area.<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,&nbsp;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 teh specified rectangular area<DT><B>Returns:</B><DD><code>true</code> if the interior intersects 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>&nbsp;p)</PRE><DL><DD>Tests whether the interior of this <code>Area</code> object intersects the interior of the 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 <code>Rectangle2D</code> to test for intersection<DT><B>Returns:</B><DD><code>true</code> if the interior intersects the 			specified <code>Rectangle2D</code>; 			<code>false</code> otherwise.</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>&nbsp;at)</PRE><DL><DD>Creates a <A HREF="../../../java/awt/geom/PathIterator.html"><CODE>PathIterator</CODE></A> for the outline of this  <code>Area</code> object.  This <code>Area</code> object is unchanged.<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>t</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>Area</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>&nbsp;at,                                    double&nbsp;flatness)</PRE><DL><DD>Creates a <code>PathIterator</code> for the flattened outline of  this <code>Area</code> object.  Only uncurved path segments represented by the SEG_MOVETO, SEG_LINETO, and SEG_CLOSE point types are returned by the iterator.  This <code>Area</code> object is unchanged.<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>t</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>Area</code>, one segment at a time.</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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Area.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup>&nbsp;2&nbsp;Platform<br>Std.&nbsp;Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../java/awt/geom/Arc2D.Float.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../java/awt/geom/CubicCurve2D.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>  &nbsp;&nbsp;<A HREF="Area.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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 + -
显示快捷键?