graphics.html

来自「API資料大全」· HTML 代码 · 共 1,336 行 · 第 1/5 页

HTML
1,336
字号
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#drawBytes(byte[], int, int, int, int)">drawBytes</A></B>(byte[]&nbsp;data,          int&nbsp;offset,          int&nbsp;length,          int&nbsp;x,          int&nbsp;y)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws the text given by the specified byte array, using this  graphics context's current font and color.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#drawChars(char[], int, int, int, int)">drawChars</A></B>(char[]&nbsp;data,          int&nbsp;offset,          int&nbsp;length,          int&nbsp;x,          int&nbsp;y)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws the text given by the specified character array, using this  graphics context's current font and color.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#drawImage(java.awt.Image, int, int, java.awt.Color, java.awt.image.ImageObserver)">drawImage</A></B>(<A HREF="../../java/awt/Image.html">Image</A>&nbsp;img,          int&nbsp;x,          int&nbsp;y,          <A HREF="../../java/awt/Color.html">Color</A>&nbsp;bgcolor,          <A HREF="../../java/awt/image/ImageObserver.html">ImageObserver</A>&nbsp;observer)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws as much of the specified image as is currently available.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#drawImage(java.awt.Image, int, int, java.awt.image.ImageObserver)">drawImage</A></B>(<A HREF="../../java/awt/Image.html">Image</A>&nbsp;img,          int&nbsp;x,          int&nbsp;y,          <A HREF="../../java/awt/image/ImageObserver.html">ImageObserver</A>&nbsp;observer)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws as much of the specified image as is currently available.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#drawImage(java.awt.Image, int, int, int, int, java.awt.Color, java.awt.image.ImageObserver)">drawImage</A></B>(<A HREF="../../java/awt/Image.html">Image</A>&nbsp;img,          int&nbsp;x,          int&nbsp;y,          int&nbsp;width,          int&nbsp;height,          <A HREF="../../java/awt/Color.html">Color</A>&nbsp;bgcolor,          <A HREF="../../java/awt/image/ImageObserver.html">ImageObserver</A>&nbsp;observer)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#drawImage(java.awt.Image, int, int, int, int, java.awt.image.ImageObserver)">drawImage</A></B>(<A HREF="../../java/awt/Image.html">Image</A>&nbsp;img,          int&nbsp;x,          int&nbsp;y,          int&nbsp;width,          int&nbsp;height,          <A HREF="../../java/awt/image/ImageObserver.html">ImageObserver</A>&nbsp;observer)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws as much of the specified image as has already been scaled to fit inside the specified rectangle.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#drawImage(java.awt.Image, int, int, int, int, int, int, int, int, java.awt.Color, java.awt.image.ImageObserver)">drawImage</A></B>(<A HREF="../../java/awt/Image.html">Image</A>&nbsp;img,          int&nbsp;dx1,          int&nbsp;dy1,          int&nbsp;dx2,          int&nbsp;dy2,          int&nbsp;sx1,          int&nbsp;sy1,          int&nbsp;sx2,          int&nbsp;sy2,          <A HREF="../../java/awt/Color.html">Color</A>&nbsp;bgcolor,          <A HREF="../../java/awt/image/ImageObserver.html">ImageObserver</A>&nbsp;observer)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws as much of the specified area of the specified image as is currently available, scaling it on the fly to fit inside the specified area of the destination drawable surface.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#drawImage(java.awt.Image, int, int, int, int, int, int, int, int, java.awt.image.ImageObserver)">drawImage</A></B>(<A HREF="../../java/awt/Image.html">Image</A>&nbsp;img,          int&nbsp;dx1,          int&nbsp;dy1,          int&nbsp;dx2,          int&nbsp;dy2,          int&nbsp;sx1,          int&nbsp;sy1,          int&nbsp;sx2,          int&nbsp;sy2,          <A HREF="../../java/awt/image/ImageObserver.html">ImageObserver</A>&nbsp;observer)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws as much of the specified area of the specified image as is currently available, scaling it on the fly to fit inside the specified area of the destination drawable surface.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#drawLine(int, int, int, int)">drawLine</A></B>(int&nbsp;x1,         int&nbsp;y1,         int&nbsp;x2,         int&nbsp;y2)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws a line, using the current color, between the points  <code>(x1,&nbsp;y1)</code> and <code>(x2,&nbsp;y2)</code>  in this graphics context's coordinate system.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#drawOval(int, int, int, int)">drawOval</A></B>(int&nbsp;x,         int&nbsp;y,         int&nbsp;width,         int&nbsp;height)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws the outline of an oval.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#drawPolygon(int[], int[], int)">drawPolygon</A></B>(int[]&nbsp;xPoints,            int[]&nbsp;yPoints,            int&nbsp;nPoints)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws a closed polygon defined by  arrays of <i>x</i> and <i>y</i> coordinates.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#drawPolygon(java.awt.Polygon)">drawPolygon</A></B>(<A HREF="../../java/awt/Polygon.html">Polygon</A>&nbsp;p)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws the outline of a polygon defined by the specified  <code>Polygon</code> object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#drawPolyline(int[], int[], int)">drawPolyline</A></B>(int[]&nbsp;xPoints,             int[]&nbsp;yPoints,             int&nbsp;nPoints)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws a sequence of connected lines defined by  arrays of <i>x</i> and <i>y</i> coordinates.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#drawRect(int, int, int, int)">drawRect</A></B>(int&nbsp;x,         int&nbsp;y,         int&nbsp;width,         int&nbsp;height)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws the outline of the specified rectangle.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#drawRoundRect(int, int, int, int, int, int)">drawRoundRect</A></B>(int&nbsp;x,              int&nbsp;y,              int&nbsp;width,              int&nbsp;height,              int&nbsp;arcWidth,              int&nbsp;arcHeight)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws an outlined round-cornered rectangle using 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 &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#drawString(java.text.AttributedCharacterIterator, int, int)">drawString</A></B>(<A HREF="../../java/text/AttributedCharacterIterator.html">AttributedCharacterIterator</A>&nbsp;iterator,           int&nbsp;x,           int&nbsp;y)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws the text given by the specified iterator, using 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 &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#drawString(java.lang.String, int, int)">drawString</A></B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;str,           int&nbsp;x,           int&nbsp;y)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Draws the text given by the specified string, using this  graphics context's current font and color.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#fill3DRect(int, int, int, int, boolean)">fill3DRect</A></B>(int&nbsp;x,           int&nbsp;y,           int&nbsp;width,           int&nbsp;height,           boolean&nbsp;raised)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Paints a 3-D highlighted rectangle filled with the current color.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#fillArc(int, int, int, int, int, int)">fillArc</A></B>(int&nbsp;x,        int&nbsp;y,        int&nbsp;width,        int&nbsp;height,        int&nbsp;startAngle,        int&nbsp;arcAngle)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fills a circular or elliptical arc covering the specified rectangle.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#fillOval(int, int, int, int)">fillOval</A></B>(int&nbsp;x,         int&nbsp;y,         int&nbsp;width,         int&nbsp;height)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fills an oval bounded by the specified rectangle with the current color.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics.html#fillPolygon(int[], int[], int)">fillPolygon</A></B>(int[]&nbsp;xPoints,            int[]&nbsp;yPoints,            int&nbsp;nPoints)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fills a closed polygon defined by  arrays of <i>x</i> and <i>y</i> coordinates.</TD></TR>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?