graphics.html
来自「API資料大全」· HTML 代码 · 共 1,336 行 · 第 1/5 页
HTML
1,336 行
<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/Graphics.html#fillPolygon(java.awt.Polygon)">fillPolygon</A></B>(<A HREF="../../java/awt/Polygon.html">Polygon</A> p)</CODE><BR> Fills the polygon defined by the specified Polygon object with the graphics context's current color.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#fillRect(int, int, int, int)">fillRect</A></B>(int x, int y, int width, int height)</CODE><BR> Fills the specified rectangle.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#fillRoundRect(int, int, int, int, int, int)">fillRoundRect</A></B>(int x, int y, int width, int height, int arcWidth, int arcHeight)</CODE><BR> Fills the specified rounded corner rectangle with the current color.</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/Graphics.html#finalize()">finalize</A></B>()</CODE><BR> Disposes of this graphics context once it is no longer referenced.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract <A HREF="../../java/awt/Shape.html">Shape</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#getClip()">getClip</A></B>()</CODE><BR> Gets the current clipping area.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract <A HREF="../../java/awt/Rectangle.html">Rectangle</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#getClipBounds()">getClipBounds</A></B>()</CODE><BR> Returns the bounding rectangle of the current clipping area.</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/Graphics.html#getClipBounds(java.awt.Rectangle)">getClipBounds</A></B>(<A HREF="../../java/awt/Rectangle.html">Rectangle</A> r)</CODE><BR> Returns the bounding rectangle of the current clipping area.</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/Graphics.html#getClipRect()">getClipRect</A></B>()</CODE><BR> <B>Deprecated.</B> <I>As of JDK version 1.1, replaced by <code>getClipBounds()</code>.</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract <A HREF="../../java/awt/Color.html">Color</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#getColor()">getColor</A></B>()</CODE><BR> Gets this graphics context's current color.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract <A HREF="../../java/awt/Font.html">Font</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#getFont()">getFont</A></B>()</CODE><BR> Gets the current font.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/awt/FontMetrics.html">FontMetrics</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#getFontMetrics()">getFontMetrics</A></B>()</CODE><BR> Gets the font metrics of the current font.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract <A HREF="../../java/awt/FontMetrics.html">FontMetrics</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#getFontMetrics(java.awt.Font)">getFontMetrics</A></B>(<A HREF="../../java/awt/Font.html">Font</A> f)</CODE><BR> Gets the font metrics for the specified font.</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/Graphics.html#hitClip(int, int, int, int)">hitClip</A></B>(int x, int y, int width, int height)</CODE><BR> Returns true if the specified rectangular area intersects the bounding rectangle of the current clipping area.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#setClip(int, int, int, int)">setClip</A></B>(int x, int y, int width, int height)</CODE><BR> Sets the current clip to the rectangle specified by the given coordinates.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#setClip(java.awt.Shape)">setClip</A></B>(<A HREF="../../java/awt/Shape.html">Shape</A> clip)</CODE><BR> Sets the current clipping area to an arbitrary clip shape.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#setColor(java.awt.Color)">setColor</A></B>(<A HREF="../../java/awt/Color.html">Color</A> c)</CODE><BR> Sets this graphics context's current color to the specified color.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#setFont(java.awt.Font)">setFont</A></B>(<A HREF="../../java/awt/Font.html">Font</A> font)</CODE><BR> Sets this graphics context's font to the specified font.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#setPaintMode()">setPaintMode</A></B>()</CODE><BR> Sets the paint mode of this graphics context to overwrite the destination with this graphics context's current color.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#setXORMode(java.awt.Color)">setXORMode</A></B>(<A HREF="../../java/awt/Color.html">Color</A> c1)</CODE><BR> Sets the paint mode of this graphics context to alternate between this graphics context's current color and the new specified color.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#toString()">toString</A></B>()</CODE><BR> Returns a <code>String</code> object representing this <code>Graphics</code> object's value.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#translate(int, int)">translate</A></B>(int x, int y)</CODE><BR> Translates the origin of the graphics context to the point (<i>x</i>, <i>y</i>) in the current coordinate system.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/lang/Object.html#clone()">clone</A>, <A HREF="../../java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Graphics()"><!-- --></A><H3>Graphics</H3><PRE>protected <B>Graphics</B>()</PRE><DL><DD>Constructs a new <code>Graphics</code> object. This constructor is the default contructor for a graphics context. <p> Since <code>Graphics</code> is an abstract class, applications cannot call this constructor directly. Graphics contexts are obtained from other graphics contexts or are created by calling <code>getGraphics</code> on a component.<DD><DL><DT><B>See Also: </B><DD><A HREF="../../java/awt/Graphics.html#create()"><CODE>create()</CODE></A>, <A HREF="../../java/awt/Component.html#getGraphics()"><CODE>Component.getGraphics()</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="create()"><!-- --></A><H3>create</H3><PRE>public abstract <A HREF="../../java/awt/Graphics.html">Graphics</A> <B>create</B>()</PRE><DL><DD>Creates a new <code>Graphics</code> object that is a copy of this <code>Graphics</code> object.<DD><DL><DT><B>Returns:</B><DD>a new graphics context that is a copy of this graphics context.</DL></DD></DL><HR><A NAME="create(int, int, int, int)"><!-- --></A><H3>create</H3><PRE>public <A HREF="../../java/awt/Graphics.html">Graphics</A> <B>create</B>(int x, int y, int width, int height)</PRE><DL><DD>Creates a new <code>Graphics</code> object based on this
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?