📄 j3dgraphics2d.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_06) on Wed Dec 13 16:20:05 PST 2006 --><TITLE>J3DGraphics2D (Java 3D 1.5.0)</TITLE><META NAME="keywords" CONTENT="javax.media.j3d.J3DGraphics2D class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="J3DGraphics2D (Java 3D 1.5.0)";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <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="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-all.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></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../javax/media/j3d/J3DBuffer.html" title="class in javax.media.j3d"><B>PREV CLASS</B></A> <A HREF="../../../javax/media/j3d/Leaf.html" title="class in javax.media.j3d"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?javax/media/j3d/J3DGraphics2D.html" target="_top"><B>FRAMES</B></A> <A HREF="J3DGraphics2D.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">javax.media.j3d</FONT><BR>Class J3DGraphics2D</H2><PRE>java.lang.Object <IMG SRC="../../../resources/inherit.gif" ALT="extended by ">java.awt.Graphics <IMG SRC="../../../resources/inherit.gif" ALT="extended by ">java.awt.Graphics2D <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>javax.media.j3d.J3DGraphics2D</B></PRE><HR><DL><DT><PRE>public abstract class <B>J3DGraphics2D</B><DT>extends java.awt.Graphics2D</DL></PRE><P>The J3DGraphics2D class extends Graphics2D to provide 2D rendering into a Canvas3D. It is an abstract base class that is further extended by a non-public Java 3D implementation class. This class allows Java 2D rendering to be mixed with Java 3D rendering in the same Canvas3D, subject to the same restrictions as imposed for 3D immediate-mode rendering: In mixed-mode rendering, all Java 2D requests must be done from one of the Canvas3D callback methods; in pure-immediate mode, the Java 3D renderer must be stopped for the Canvas3D being rendered into. <p> An application obtains a J3D 2D graphics context object from the Canvas3D object that the application wishes to render into by using the getGraphics2D method. A new J3DGraphics2D object is created if one does not already exist. <p> Note that the drawing methods in this class, including those inherited from Graphics2D, are not necessarily executed immediately. They may be buffered up for future execution. Applications must call the <code><a href="#flush(boolean)">flush</a>(boolean)</code> method to ensure that the rendering actually happens. The flush method is implicitly called in the following cases: <ul> <li>The <code>Canvas3D.swap</code> method calls <code>flush(true)</code></li> <li>The Java 3D renderer calls <code>flush(true)</code> prior to swapping the buffer for a double buffered on-screen Canvas3D</li> <li>The Java 3D renderer calls <code>flush(true)</code> prior to copying into the off-screen buffer of an off-screen Canvas3D</li> <li>The Java 3D renderer calls <code>flush(false)</code> after calling the preRender, renderField, postRender, and postSwap Canvas3D callback methods.</li> </ul> <p> A single-buffered, pure-immediate mode application must explicitly call flush to ensure that the graphics will be rendered to the Canvas3D.<P><P><DL><DT><B>Since:</B></DT> <DD>Java 3D 1.2</DD><DT><B>See Also:</B><DD><A HREF="../../../javax/media/j3d/Canvas3D.html#getGraphics2D()"><CODE>Canvas3D.getGraphics2D()</CODE></A></DL><HR><P><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></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="../../../javax/media/j3d/J3DGraphics2D.html#clearRect(int, int, int, int)">clearRect</A></B>(int x, int y, int width, int height)</CODE><BR> This method is not supported.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.awt.Graphics</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/J3DGraphics2D.html#create()">create</A></B>()</CODE><BR> This method is not supported.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.awt.Graphics</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/J3DGraphics2D.html#create(int, int, int, int)">create</A></B>(int x, int y, int width, int height)</CODE><BR> This method is not supported.</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="../../../javax/media/j3d/J3DGraphics2D.html#drawAndFlushImage(java.awt.image.BufferedImage, int, int, java.awt.image.ImageObserver)">drawAndFlushImage</A></B>(java.awt.image.BufferedImage img, int x, int y, java.awt.image.ImageObserver observer)</CODE><BR> Draws the specified image and flushes the buffer.</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="../../../javax/media/j3d/J3DGraphics2D.html#flush(boolean)">flush</A></B>(boolean wait)</CODE><BR> Flushes all previously executed rendering operations to the drawing buffer for this 2D graphics object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.awt.Color</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/media/j3d/J3DGraphics2D.html#getBackground()">getBackground</A></B>()</CODE><BR> This method is not supported.</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="../../../javax/media/j3d/J3DGraphics2D.html#setBackground(java.awt.Color)">setBackground</A></B>(java.awt.Color color)</CODE><BR> This method is not supported.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.awt.Graphics2D"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.awt.Graphics2D</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>addRenderingHints, clip, draw, draw3DRect, drawGlyphVector, drawImage, drawImage, drawRenderableImage, drawRenderedImage, drawString, drawString, drawString, drawString, fill, fill3DRect, getComposite, getDeviceConfiguration, getFontRenderContext, getPaint, getRenderingHint, getRenderingHints, getStroke, getTransform, hit, rotate, rotate, scale, setComposite, setPaint, setRenderingHint, setRenderingHints, setStroke, setTransform, shear, transform, translate, translate</CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.awt.Graphics"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -