rectangle2d.html
来自「API資料大全」· HTML 代码 · 共 1,015 行 · 第 1/4 页
HTML
1,015 行
<A NAME="Rectangle2D()"><!-- --></A><H3>Rectangle2D</H3><PRE>protected <B>Rectangle2D</B>()</PRE><DL><DD>This is an abstract class that cannot be instantiated directly. Type-specific implementation subclasses are available for instantiation and provide a number of formats for storing the information necessary to satisfy the various accessor methods below.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../../java/awt/geom/Rectangle2D.Float.html"><CODE>Rectangle2D.Float</CODE></A>, <A HREF="../../../java/awt/geom/Rectangle2D.Double.html"><CODE>Rectangle2D.Double</CODE></A>, <A HREF="../../../java/awt/Rectangle.html"><CODE>Rectangle</CODE></A></DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="setRect(double, double, double, double)"><!-- --></A><H3>setRect</H3><PRE>public abstract void <B>setRect</B>(double x, double y, double w, double h)</PRE><DL><DD>Sets the location and size of this <code>Rectangle2D</code> to the specified double values.<DD><DL><DT><B>Parameters:</B><DD><CODE>x, y</CODE> - the coordinates to which to set the location of the upper left corner of this <code>Rectangle2D</code><DD><CODE>w</CODE> - the value to use to set the width of this <code>Rectangle2D</code><DD><CODE>h</CODE> - the value to use to set the height of this <code>Rectangle2D</code><DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="setRect(java.awt.geom.Rectangle2D)"><!-- --></A><H3>setRect</H3><PRE>public void <B>setRect</B>(<A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> r)</PRE><DL><DD>Sets this <code>Rectangle2D</code> to be the same as the specified <code>Rectangle2D</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the specified <code>Rectangle2D</code><DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="intersectsLine(double, double, double, double)"><!-- --></A><H3>intersectsLine</H3><PRE>public boolean <B>intersectsLine</B>(double x1, double y1, double x2, double y2)</PRE><DL><DD>Tests if the specified line segment intersects the interior of this <code>Rectangle2D</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>x1, y1</CODE> - the first endpoint of the specified line segment<DD><CODE>x2, y2</CODE> - the second endpoint of the specified line segment<DT><B>Returns:</B><DD><code>true</code> if the specified line segment intersects the interior of this <code>Rectangle2D</code>; <code>false</code> otherwise.<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="intersectsLine(java.awt.geom.Line2D)"><!-- --></A><H3>intersectsLine</H3><PRE>public boolean <B>intersectsLine</B>(<A HREF="../../../java/awt/geom/Line2D.html">Line2D</A> l)</PRE><DL><DD>Tests if the specified line segment intersects the interior of this <code>Rectangle2D</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>l</CODE> - the specified <A HREF="../../../java/awt/geom/Line2D.html"><CODE>Line2D</CODE></A> to test for intersection with the interior of this <code>Rectangle2D</code><DT><B>Returns:</B><DD><code>true</code> if the specified <code>Line2D</code> intersects the interior of this <code>Rectangle2D</code>; <code>false</code> otherwise.<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="outcode(double, double)"><!-- --></A><H3>outcode</H3><PRE>public abstract int <B>outcode</B>(double x, double y)</PRE><DL><DD>Determines where the specified coordinates lie with respect to this <code>Rectangle2D</code>. This method computes a binary OR of the appropriate mask values indicating, for each side of this <code>Rectangle2D</code>, whether or not the specified coordinates are on the same side of the edge as the rest of this <code>Rectangle2D</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>x, y</CODE> - the specified coordinates<DT><B>Returns:</B><DD>the logical OR of all appropriate out codes.<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><A HREF="../../../java/awt/geom/Rectangle2D.html#OUT_LEFT"><CODE>OUT_LEFT</CODE></A>, <A HREF="../../../java/awt/geom/Rectangle2D.html#OUT_TOP"><CODE>OUT_TOP</CODE></A>, <A HREF="../../../java/awt/geom/Rectangle2D.html#OUT_RIGHT"><CODE>OUT_RIGHT</CODE></A>, <A HREF="../../../java/awt/geom/Rectangle2D.html#OUT_BOTTOM"><CODE>OUT_BOTTOM</CODE></A></DL></DD></DL><HR><A NAME="outcode(java.awt.geom.Point2D)"><!-- --></A><H3>outcode</H3><PRE>public int <B>outcode</B>(<A HREF="../../../java/awt/geom/Point2D.html">Point2D</A> p)</PRE><DL><DD>Determines where the specified <A HREF="../../../java/awt/geom/Point2D.html"><CODE>Point2D</CODE></A> lies with respect to this <code>Rectangle2D</code>. This method computes a binary OR of the appropriate mask values indicating, for each side of this <code>Rectangle2D</code>, whether or not the specified <code>Point2D</code> is on the same side of the edge as the rest of this <code>Rectangle2D</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>p</CODE> - the specified <code>Point2D</code><DT><B>Returns:</B><DD>the logical OR of all appropriate out codes.<DT><B>Since: </B><DD>1.2</DD><DT><B>See Also: </B><DD><A HREF="../../../java/awt/geom/Rectangle2D.html#OUT_LEFT"><CODE>OUT_LEFT</CODE></A>, <A HREF="../../../java/awt/geom/Rectangle2D.html#OUT_TOP"><CODE>OUT_TOP</CODE></A>, <A HREF="../../../java/awt/geom/Rectangle2D.html#OUT_RIGHT"><CODE>OUT_RIGHT</CODE></A>, <A HREF="../../../java/awt/geom/Rectangle2D.html#OUT_BOTTOM"><CODE>OUT_BOTTOM</CODE></A></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 <code>Rectangle2D</code> to the specified rectangular 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 to which to set the location of the upper left corner of the outer bounds of this <code>Rectangle2D</code><DD><CODE>w</CODE> - the value to use to set the width of the outer bounds of this <code>Rectangle2D</code><DD><CODE>h</CODE> - the value to use to set the height of the outer bounds of this <code>Rectangle2D</code><DT><B>Since: </B><DD>1.2</DD></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 this <code>Rectangle2D</code>.<DD><DL><DT><B>Returns:</B><DD>the bounding box of this <code>Rectangle2D</code>.<DT><B>Since: </B><DD>1.2</DD></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 this <code>Rectangle2D</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>x, y</CODE> - the coordinates to test<DT><B>Returns:</B><DD><code>true</code> if the specified coordinates are inside the boundary of this <code>Rectangle2D</code>; <code>false</code> otherwise.<DT><B>Since: </B><DD>1.2</DD></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 interior of this <code>Rectangle2D</code> intersects the interior of a specified set of rectangular coordinates.<DD><DL><DT><B>Parameters:</B><DD><CODE>x, y</CODE> - the coordinates of the upper left corner of the specified set of rectangular coordinates<DD><CODE>w</CODE> - the width of the specified set of rectangular coordinates<DD><CODE>h</CODE> - the height of the specified set of rectangular coordinates<DT><B>Returns:</B><DD><code>true</code> if this <code>Rectangle2D</code> intersects the interior of a specified set of rectangular coordinates; <code>false</code> otherwise.<DT><B>Since: </B><DD>1.2</DD></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 this <code>Rectangle2D</code> entirely contains the specified set of rectangular coordinates.<DD><DL><DT><B>Parameters:</B><DD><CODE>x, y</CODE> - the coordinates of the upper left corner of the specified set of rectangular coordinates<DD><CODE>w</CODE> - the width of the specified set of rectangular coordinates<DD><CODE>h</CODE> - the height of the specified set of rectangular coordinates<DT><B>Returns:</B><DD><code>true</code> if this <code>Rectangle2D</code> entirely contains specified set of rectangular coordinates; <code>false</code> otherwise.<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="createIntersection(java.awt.geom.Rectangle2D)"><!-- --></A><H3>createIntersection</H3><PRE>public abstract <A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> <B>createIntersection</B>(<A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> r)</PRE><DL><DD>Returns a new <code>Rectangle2D</code> object representing the intersection of this <code>Rectangle2D</code> with the specified <code>Rectangle2D</code>.<DD><DL><DT><B>Parameters:</B><DD><CODE>r</CODE> - the <code>Rectangle2D</code> to be intersected with this <code>Rectangle2D</code><DT><B>Returns:</B><DD>the largest <code>Rectangle2D</code> contained in both the specified <code>Rectangle2D</code> and in this <code>Rectangle2D</code>.<DT><B>Since: </B><DD>1.2</DD></DL></DD></DL><HR><A NAME="intersect(java.awt.geom.Rectangle2D, java.awt.geom.Rectangle2D, java.awt.geom.Rectangle2D)"><!-- --></A><H3>intersect</H3><PRE>public static void <B>intersect</B>(<A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> src1, <A HREF="../../../java/awt/geom/Rectangle2D.html">Rectangle2D</A> src2,
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?