graphics2d.html

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

HTML
1,145
字号
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a new <code>Graphics2D</code> object.</TD></TR></TABLE>&nbsp;<!-- ========== 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>abstract &nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics2D.html#addRenderingHints(java.util.Map)">addRenderingHints</A></B>(<A HREF="../../java/util/Map.html">Map</A>&nbsp;hints)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the values of an arbitrary number of preferences for the rendering algorithms.</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/Graphics2D.html#clip(java.awt.Shape)">clip</A></B>(<A HREF="../../java/awt/Shape.html">Shape</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Intersects the current <code>Clip</code> with the interior of the specified <code>Shape</code> and sets the <code>Clip</code> to the resulting intersection.</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/Graphics2D.html#draw(java.awt.Shape)">draw</A></B>(<A HREF="../../java/awt/Shape.html">Shape</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Strokes the outline of a <code>Shape</code> using the settings of the  current <code>Graphics2D</code> context.</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/Graphics2D.html#draw3DRect(int, int, int, int, boolean)">draw3DRect</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;Draws a 3-D highlighted 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/Graphics2D.html#drawGlyphVector(java.awt.font.GlyphVector, float, float)">drawGlyphVector</A></B>(<A HREF="../../java/awt/font/GlyphVector.html">GlyphVector</A>&nbsp;g,                float&nbsp;x,                float&nbsp;y)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Renders the text of the specified  <A HREF="../../java/awt/font/GlyphVector.html"><CODE>GlyphVector</CODE></A> using the <code>Graphics2D</code> context's rendering attributes.</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/Graphics2D.html#drawImage(java.awt.image.BufferedImage, java.awt.image.BufferedImageOp, int, int)">drawImage</A></B>(<A HREF="../../java/awt/image/BufferedImage.html">BufferedImage</A>&nbsp;img,          <A HREF="../../java/awt/image/BufferedImageOp.html">BufferedImageOp</A>&nbsp;op,          int&nbsp;x,          int&nbsp;y)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Renders a <code>BufferedImage</code> that is filtered with a  <A HREF="../../java/awt/image/BufferedImageOp.html"><CODE>BufferedImageOp</CODE></A>.</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/Graphics2D.html#drawImage(java.awt.Image, java.awt.geom.AffineTransform, java.awt.image.ImageObserver)">drawImage</A></B>(<A HREF="../../java/awt/Image.html">Image</A>&nbsp;img,          <A HREF="../../java/awt/geom/AffineTransform.html">AffineTransform</A>&nbsp;xform,          <A HREF="../../java/awt/image/ImageObserver.html">ImageObserver</A>&nbsp;obs)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Renders an image, applying a transform from image space into user space before drawing.</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/Graphics2D.html#drawRenderableImage(java.awt.image.renderable.RenderableImage, java.awt.geom.AffineTransform)">drawRenderableImage</A></B>(<A HREF="../../java/awt/image/renderable/RenderableImage.html">RenderableImage</A>&nbsp;img,                    <A HREF="../../java/awt/geom/AffineTransform.html">AffineTransform</A>&nbsp;xform)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Renders a  <A HREF="../../java/awt/image/renderable/RenderableImage.html"><CODE>RenderableImage</CODE></A>, applying a transform from image space into user space before drawing.</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/Graphics2D.html#drawRenderedImage(java.awt.image.RenderedImage, java.awt.geom.AffineTransform)">drawRenderedImage</A></B>(<A HREF="../../java/awt/image/RenderedImage.html">RenderedImage</A>&nbsp;img,                  <A HREF="../../java/awt/geom/AffineTransform.html">AffineTransform</A>&nbsp;xform)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Renders a <A HREF="../../java/awt/image/RenderedImage.html"><CODE>RenderedImage</CODE></A>, applying a transform from image  space into user space before drawing.</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/Graphics2D.html#drawString(java.text.AttributedCharacterIterator, float, float)">drawString</A></B>(<A HREF="../../java/text/AttributedCharacterIterator.html">AttributedCharacterIterator</A>&nbsp;iterator,           float&nbsp;x,           float&nbsp;y)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Renders the text of the specified iterator, using the  <code>Graphics2D</code> context's current <code>Paint</code>.</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/Graphics2D.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;Renders the text of the specified iterator, using the <code>Graphics2D</code> context's current <code>Paint</code>.</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/Graphics2D.html#drawString(java.lang.String, float, float)">drawString</A></B>(<A HREF="../../java/lang/String.html">String</A>&nbsp;s,           float&nbsp;x,           float&nbsp;y)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Renders the text specified by the specified <code>String</code>,  using the current <code>Font</code> and <code>Paint</code> attributes  in the <code>Graphics2D</code> context.</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/Graphics2D.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;Renders the text of the specified <code>String</code>, using the  current <code>Font</code> and <code>Paint</code> attributes in the  <code>Graphics2D</code> context.</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/Graphics2D.html#fill(java.awt.Shape)">fill</A></B>(<A HREF="../../java/awt/Shape.html">Shape</A>&nbsp;s)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fills the interior of a <code>Shape</code> using the settings of the    <code>Graphics2D</code> context.</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/Graphics2D.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;<A HREF="../../java/awt/Color.html">Color</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics2D.html#getBackground()">getBackground</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the background color used for clearing a region.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;<A HREF="../../java/awt/Composite.html">Composite</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics2D.html#getComposite()">getComposite</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current <code>Composite</code> in the <code>Graphics2D</code> context.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;<A HREF="../../java/awt/GraphicsConfiguration.html">GraphicsConfiguration</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics2D.html#getDeviceConfiguration()">getDeviceConfiguration</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the device configuration associated with this  <code>Graphics2D</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;<A HREF="../../java/awt/font/FontRenderContext.html">FontRenderContext</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics2D.html#getFontRenderContext()">getFontRenderContext</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the rendering context of the <code>Font</code> within this  <code>Graphics2D</code> context.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;<A HREF="../../java/awt/Paint.html">Paint</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics2D.html#getPaint()">getPaint</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current <code>Paint</code> of the  <code>Graphics2D</code> context.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>abstract &nbsp;<A HREF="../../java/lang/Object.html">Object</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../java/awt/Graphics2D.html#getRenderingHint(java.awt.RenderingHints.Key)">getRenderingHint</A></B>(<A HREF="../../java/awt/RenderingHints.Key.html">RenderingHints.Key</A>&nbsp;hintKey)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value of a single preference for the rendering algorithms.</TD>

⌨️ 快捷键说明

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