area.html
来自「API資料大全」· HTML 代码 · 共 853 行 · 第 1/3 页
HTML
853 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:33:40 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class Area</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_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/Area.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/Arc2D.Float.html"><B>PREV CLASS</B></A> <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> <A HREF="Area.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | 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><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.awt.geom</FONT><BR>Class Area</H2><PRE><A HREF="../../../java/lang/Object.html">java.lang.Object</A> | +--<B>java.awt.geom.Area</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../java/lang/Cloneable.html">Cloneable</A>, <A HREF="../../../java/awt/Shape.html">Shape</A></DD></DL><HR><DL><DT>public class <B>Area</B><DT>extends <A HREF="../../../java/lang/Object.html">Object</A><DT>implements <A HREF="../../../java/awt/Shape.html">Shape</A>, <A HREF="../../../java/lang/Cloneable.html">Cloneable</A></DL><P>The <code>Area</code> class is a device-independent specification of an arbitrarily-shaped area. The <code>Area</code> object is defined as an object that performs certain binary CAG (Constructive Area Geometry) operations on other area-enclosing geometries, such as rectangles, ellipses, and polygons. The CAG operations are Add(union), Subtract, Intersect, and ExclusiveOR. For example, an <code>Area</code> can be made up of the area of a rectangle minus the area of an ellipse.<P><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#Area()">Area</A></B>()</CODE><BR> Default constructor which creates an empty area.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#Area(java.awt.Shape)">Area</A></B>(<A HREF="../../../java/awt/Shape.html">Shape</A> s)</CODE><BR> The <code>Area</code> class creates an area geometry from the specified <A HREF="../../../java/awt/Shape.html"><CODE>Shape</CODE></A> object.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#add(java.awt.geom.Area)">add</A></B>(<A HREF="../../../java/awt/geom/Area.html">Area</A> rhs)</CODE><BR> Adds the shape of the specified <code>Area</code> to the shape of this <code>Area</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#clone()">clone</A></B>()</CODE><BR> Returns an exact copy of this <code>Area</code> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#contains(double, double)">contains</A></B>(double x, double y)</CODE><BR> Tests if a specifed point lies inside the boundary of this <code>Area</code> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#contains(double, double, double, double)">contains</A></B>(double x, double y, double w, double h)</CODE><BR> Tests whether or not the interior of this <code>Area</code> object completely contains the specified rectangular area.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#contains(java.awt.geom.Point2D)">contains</A></B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> p)</CODE><BR> 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.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#contains(java.awt.geom.Rectangle2D)">contains</A></B>(<A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> p)</CODE><BR> Tests whether or not the interior of this <code>Area</code> object completely contains the specified <code>Rectangle2D</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/geom/Area.html">Area</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#createTransformedArea(java.awt.geom.AffineTransform)">createTransformedArea</A></B>(<A HREF="../../../java/awt/geom/AffineTransform.html">AffineTransform</A> t)</CODE><BR> Creates a new <code>Area</code> object that contains the same geometry as this <code>Area</code> transformed by the specified <code>AffineTransform</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#equals(java.awt.geom.Area)">equals</A></B>(<A HREF="../../../java/awt/geom/Area.html">Area</A> other)</CODE><BR> Tests whether the geometries of the two <code>Area</code> objects are equal.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#exclusiveOr(java.awt.geom.Area)">exclusiveOr</A></B>(<A HREF="../../../java/awt/geom/Area.html">Area</A> rhs)</CODE><BR> Sets the shape of this <code>Area</code> to be the combined area of its current shape and the shape of the specified <code>Area</code>, minus their intersection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/Rectangle.html">Rectangle</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#getBounds()">getBounds</A></B>()</CODE><BR> Returns a bounding <A HREF="../../../java/awt/Rectangle.html"><CODE>Rectangle</CODE></A> that completely encloses this <code>Area</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#getBounds2D()">getBounds2D</A></B>()</CODE><BR> Returns a high precision bounding <A HREF="../../../java/awt/geom/Rectangle2D.html"><CODE>Rectangle2D</CODE></A> that completely encloses this <code>Area</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/geom/PathIterator.html">PathIterator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#getPathIterator(java.awt.geom.AffineTransform)">getPathIterator</A></B>(<A HREF="../../../java/awt/geom/AffineTransform.html">AffineTransform</A> at)</CODE><BR> Creates a <A HREF="../../../java/awt/geom/PathIterator.html"><CODE>PathIterator</CODE></A> for the outline of this <code>Area</code> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/awt/geom/PathIterator.html">PathIterator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#getPathIterator(java.awt.geom.AffineTransform, double)">getPathIterator</A></B>(<A HREF="../../../java/awt/geom/AffineTransform.html">AffineTransform</A> at, double flatness)</CODE><BR> Creates a <code>PathIterator</code> for the flattened outline of this <code>Area</code> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#intersect(java.awt.geom.Area)">intersect</A></B>(<A HREF="../../../java/awt/geom/Area.html">Area</A> rhs)</CODE><BR> Sets the shape of this <code>Area</code> to the intersection of its current shape and the shape of the specified <code>Area</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#intersects(double, double, double, double)">intersects</A></B>(double x, double y, double w, double h)</CODE><BR> Tests whether the interior of this <code>Area</code> object intersects the interior of the specified rectangular area.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#intersects(java.awt.geom.Rectangle2D)">intersects</A></B>(<A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> p)</CODE><BR> Tests whether the interior of this <code>Area</code> object intersects the interior of the specified <code>Rectangle2D</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/Area.html#isEmpty()">isEmpty</A></B>()</CODE><BR> Tests whether this <code>Area</code> object encloses any area.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?