⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 graphicprimitive2d.html

📁 Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理信息系统。Geotools提供了OGC(Open Geospatial Consortium)规范的一个实现来作为他们的
💻 HTML
📖 第 1 页 / 共 3 页
字号:
        graphicCRS,        context.<A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#objectiveCRS"><CODE>objectiveCRS</CODE></A> )</code></b><br>     Returns a transform from the underlying CRS to the rendering CRS.</p></li> <li><p><b><code>context.<A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#getMathTransform(org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.crs.CoordinateReferenceSystem)"><CODE>getMathTransform</CODE></A>(        context.<A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#objectiveCRS"><CODE>objectiveCRS</CODE></A>,        context.<A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#displayCRS"><CODE>displayCRS</CODE></A> )</code></b><br>     Returns a transform from the rendering CRS to the <cite>Java2D</cite> CRS in     "dots" units (usually 1/72 of inch). This transformation is zoom dependent.</p></li> </ul>  By default, painting is done in the <cite>Java2D</cite> user space (a.k.a. <A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#displayCRS">display CRS</A>. However, the CRS can easily be switched. An implementation may looks like as below: <blockquote><code> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Graphics2D.html" title="class or interface in java.awt">Graphics2D</A> graphics = context.<A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#getGraphics()">getGraphics()</A>;<br> context.<A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#setGraphicsCRS(org.opengis.referencing.crs.CoordinateReferenceSystem)">setGraphicsCRS</A>(context.<A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#objectiveCRS">objectiveCRS</A>);<br> // </code>NOTE: Skip the above line if you want to perform the rendering in<code><br> // </code>the default <cite>Java2D</cite> user space (a.k.a. <A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#displayCRS"><CODE>displayCRS</CODE></A>) rather than<code><br> // </code>in terms of "real world" units.<code><br> try {<br> &nbsp;&nbsp;&nbsp;&nbsp; // </code><cite>Paint here map features in geographic coordinates (usually meters or angular degrees).</cite><code><br> &nbsp;&nbsp;&nbsp;&nbsp; context.<A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#addPaintedArea(java.awt.Shape)">addPaintedArea</A>(...);<br> &nbsp;&nbsp;&nbsp;&nbsp; context.<A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#setGraphicsCRS(org.opengis.referencing.crs.CoordinateReferenceSystem)">setGraphicsCRS</A>(context.<A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#displayCRS">displayCRS</A>);<br> &nbsp;&nbsp;&nbsp;&nbsp; // </code><cite>Write here texts or labels. Coordinates are in <u>dots</u>.</cite><code><br> &nbsp;&nbsp;&nbsp;&nbsp; context.<A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#addPaintedArea(java.awt.Shape)">addPaintedArea</A>(...);<br> } finally {<br> &nbsp;&nbsp;&nbsp;&nbsp; // </code><cite>Restore here <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Graphics2D.html" title="class or interface in java.awt"><CODE>Graphics2D</CODE></A> it its initial state.</cite><code><br> }<br> </code></blockquote> During the rendering process, implementations are encouraged to declare a (potentially approximative) bounding shape of their painted area with calls to <A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#addPaintedArea(java.awt.Shape)"><CODE>RenderingContext.addPaintedArea(Shape)</CODE></A>. This is an optional operation: providing those hints only help <A HREF="../../../../org/geotools/display/canvas/BufferedCanvas2D.html" title="class in org.geotools.display.canvas"><CODE>BufferedCanvas2D</CODE></A> to speed up future rendering and events processing.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>context</CODE> - Information relatives to the rendering context. This object contains the         <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Graphics2D.html" title="class or interface in java.awt"><CODE>Graphics2D</CODE></A> to use and methods for getting <CODE>MathTransform</CODE> objects.<DT><B>Throws:</B><DD><CODE>TransformException</CODE> - If a coordinate transformation failed during the rendering         process.</DL></DD></DL><HR><A NAME="prefetch(org.geotools.display.canvas.RenderingContext)"><!-- --></A><H3>prefetch</H3><PRE>protected void <B>prefetch</B>(<A HREF="../../../../org/geotools/display/canvas/RenderingContext.html" title="class in org.geotools.display.canvas">RenderingContext</A>&nbsp;context)</PRE><DL><DD>Hints that this graphic might be painted in the near future. Some implementations may spawn a thread to compute the data while others may ignore the hint. The default implementation does nothing.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>context</CODE> - Information relatives to the rendering context. This object contains         methods for querying the area to be painted in arbitrary coordinate reference system.<DT><B>See Also:</B><DD><A HREF="http://java.sun.com/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/PlanarImage.html#prefetchTiles(java.awt.Point[])" title="class or interface in javax.media.jai"><CODE>PlanarImage.prefetchTiles(java.awt.Point[])</CODE></A></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/GraphicPrimitive2D.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../org/geotools/display/canvas/DisplayObject.html" title="class in org.geotools.display.canvas"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../org/geotools/display/canvas/ImageType.html" title="class in org.geotools.display.canvas"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="GraphicPrimitive2D.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_DisplayObject">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright &copy; 1996-2007 <a href="http://www.geotools.org">Geotools</a>. All Rights Reserved.</BODY></HTML>

⌨️ 快捷键说明

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