generalpath.html
来自「API資料大全」· HTML 代码 · 共 1,030 行 · 第 1/4 页
HTML
1,030 行
<!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:44 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Class GeneralPath</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/GeneralPath.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/FlatteningPathIterator.html"><B>PREV CLASS</B></A> <A HREF="../../../java/awt/geom/Line2D.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="GeneralPath.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <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><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.awt.geom</FONT><BR>Class GeneralPath</H2><PRE><A HREF="../../../java/lang/Object.html">java.lang.Object</A> | +--<B>java.awt.geom.GeneralPath</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 final class <B>GeneralPath</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>GeneralPath</code> class represents a geometric path constructed from straight lines, and quadratic and cubic (Bézier) curves. It can contain multiple subpaths. <p> The winding rule specifies how the interior of a path is determined. There are two types of winding rules: EVEN_ODD and NON_ZERO. <p> An EVEN_ODD winding rule means that enclosed regions of the path alternate between interior and exterior areas as traversed from the outside of the path towards a point inside the region. <p> A NON_ZERO winding rule means that if a ray is drawn in any direction from a given point to infinity and the places where the path intersects the ray are examined, the point is inside of the path if and only if the number of times that the path crosses the ray from left to right does not equal the number of times that the path crosses the ray from right to left.<P><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/GeneralPath.html#WIND_EVEN_ODD">WIND_EVEN_ODD</A></B></CODE><BR> An even-odd winding rule for determining the interior of a path.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/awt/geom/GeneralPath.html#WIND_NON_ZERO">WIND_NON_ZERO</A></B></CODE><BR> A non-zero winding rule for determining the interior of a path.</TD></TR></TABLE> <!-- ======== 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/GeneralPath.html#GeneralPath()">GeneralPath</A></B>()</CODE><BR> Constructs a new <code>GeneralPath</code> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/geom/GeneralPath.html#GeneralPath(int)">GeneralPath</A></B>(int rule)</CODE><BR> Constructs a new <code>GeneralPath</code> object with the specified winding rule to control operations that require the interior of the path to be defined.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/geom/GeneralPath.html#GeneralPath(int, int)">GeneralPath</A></B>(int rule, int initialCapacity)</CODE><BR> Constructs a new <code>GeneralPath</code> object with the specified winding rule and the specified initial capacity to store path coordinates.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../java/awt/geom/GeneralPath.html#GeneralPath(java.awt.Shape)">GeneralPath</A></B>(<A HREF="../../../java/awt/Shape.html">Shape</A> s)</CODE><BR> Constructs a new <code>GeneralPath</code> object from an arbitrary <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/GeneralPath.html#append(java.awt.geom.PathIterator, boolean)">append</A></B>(<A HREF="../../../java/awt/geom/PathIterator.html">PathIterator</A> pi, boolean connect)</CODE><BR> Appends the geometry of the specified <A HREF="../../../java/awt/geom/PathIterator.html"><CODE>PathIterator</CODE></A> object to the path, possibly connecting the new geometry to the existing path segments with a line segment.</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/GeneralPath.html#append(java.awt.Shape, boolean)">append</A></B>(<A HREF="../../../java/awt/Shape.html">Shape</A> s, boolean connect)</CODE><BR> Appends the geometry of the specified <code>Shape</code> object to the path, possibly connecting the new geometry to the existing path segments with a line segment.</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/GeneralPath.html#clone()">clone</A></B>()</CODE><BR> Creates a new object of the same class as this 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/GeneralPath.html#closePath()">closePath</A></B>()</CODE><BR> Closes the current subpath by drawing a straight line back to the coordinates of the last <code>moveTo</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/GeneralPath.html#contains(double, double)">contains</A></B>(double x, double y)</CODE><BR> Tests if the specified coordinates are inside the boundary of this <code>Shape</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/GeneralPath.html#contains(double, double, double, double)">contains</A></B>(double x, double y, double w, double h)</CODE><BR> Tests if the specified rectangular area is inside the boundary of this <code>Shape</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/GeneralPath.html#contains(java.awt.geom.Point2D)">contains</A></B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> p)</CODE><BR> Tests if the specified <code>Point2D</code> is inside the boundary of this <code>Shape</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/GeneralPath.html#contains(java.awt.geom.Rectangle2D)">contains</A></B>(<A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> r)</CODE><BR> Tests if the specified <code>Rectangle2D</code> is inside the boundary of this <code>Shape</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?