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

📄 renderingcontext.html

📁 Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理信息系统。Geotools提供了OGC(Open Geospatial Consortium)规范的一个实现来作为他们的
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/AffineTransform.html" title="class or interface in java.awt.geom">AffineTransform</A> <B>getAffineTransform</B>(CoordinateReferenceSystem&nbsp;sourceCRS,                                          CoordinateReferenceSystem&nbsp;targetCRS)                                   throws FactoryException</PRE><DL><DD>Returns an affine transform between two coordinate reference systems. This method is equivalents to the following pseudo-code, except for the exception to be thrown if the transform is not an instance of <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/AffineTransform.html" title="class or interface in java.awt.geom"><CODE>AffineTransform</CODE></A>.  <blockquote><pre> return (AffineTransform) <A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#getMathTransform(org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.crs.CoordinateReferenceSystem)"><CODE>getMathTransform</CODE></A>(sourceCRS, targetCRS); </pre></blockquote><P><DD><DL><DT><B>Parameters:</B><DD><CODE>sourceCRS</CODE> - The source coordinate reference system.<DD><CODE>targetCRS</CODE> - The target coordinate reference system.<DT><B>Returns:</B><DD>An affine transform from  to .<DT><B>Throws:</B><DD><CODE>FactoryException</CODE> - if the transform can't be created or is not affine.<DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#getMathTransform(org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.crs.CoordinateReferenceSystem)"><CODE>getMathTransform(org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.crs.CoordinateReferenceSystem)</CODE></A>, <A HREF="../../../../org/geotools/display/canvas/DisplayObject.html#getImplHint(java.lang.String)"><CODE>DisplayObject.getImplHint(java.lang.String)</CODE></A>, <A HREF="../../../../org/geotools/factory/Hints.html#COORDINATE_OPERATION_FACTORY"><CODE>Hints.COORDINATE_OPERATION_FACTORY</CODE></A></DL></DD></DL><HR><A NAME="getMathTransform(org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.crs.CoordinateReferenceSystem)"><!-- --></A><H3>getMathTransform</H3><PRE>public MathTransform <B>getMathTransform</B>(CoordinateReferenceSystem&nbsp;sourceCRS,                                      CoordinateReferenceSystem&nbsp;targetCRS)                                                                 throws FactoryException</PRE><DL><DD>Returns a transform between two coordinate systems. If a <A HREF="../../../../org/geotools/factory/Hints.html#COORDINATE_OPERATION_FACTORY"><CODE>Hints.COORDINATE_OPERATION_FACTORY</CODE></A> has been provided to the <A HREF="../../../../org/geotools/display/canvas/BufferedCanvas2D.html" title="class in org.geotools.display.canvas"><CODE>BufferedCanvas2D</CODE></A>, then the specified coordinate operation factory will be used. The arguments are usually (but not necessarily) one of the following pairs: <ul>   <li><p><b>(, <A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#objectiveCRS">objectiveCRS</A>):</b><br>       Arbitrary transform from the data CRS (used internally in a <A HREF="../../../../org/geotools/display/canvas/GraphicPrimitive2D.html" title="class in org.geotools.display.canvas"><CODE>GraphicPrimitive2D</CODE></A>)       to the objective CRS (set in <A HREF="../../../../org/geotools/display/canvas/BufferedCanvas2D.html" title="class in org.geotools.display.canvas"><CODE>BufferedCanvas2D</CODE></A>).</p></li>    <li><p><b>(<A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#objectiveCRS"><CODE>objectiveCRS</CODE></A>, <A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#displayCRS"><CODE>displayCRS</CODE></A>):</b><br>       <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/AffineTransform.html" title="class or interface in java.awt.geom">Affine transform</A> from the objective CRS in "real world"       units (usually metres or degrees) to the display CRS in dots (usually 1/72 of inch).       This transform changes every time the zoom (or map scale) changes.</p></li> </ul><P><DD><DL><DT><B>Parameters:</B><DD><CODE>sourceCRS</CODE> - The source coordinate reference system.<DD><CODE>targetCRS</CODE> - The target coordinate reference system.<DT><B>Returns:</B><DD>A transform from  to .<DT><B>Throws:</B><DD><CODE>FactoryException</CODE> - if the transformation can't be created.<DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#getAffineTransform(org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.crs.CoordinateReferenceSystem)"><CODE>getAffineTransform(org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.crs.CoordinateReferenceSystem)</CODE></A>, <A HREF="../../../../org/geotools/display/canvas/DisplayObject.html#getImplHint(java.lang.String)"><CODE>DisplayObject.getImplHint(java.lang.String)</CODE></A>, <A HREF="../../../../org/geotools/factory/Hints.html#COORDINATE_OPERATION_FACTORY"><CODE>Hints.COORDINATE_OPERATION_FACTORY</CODE></A></DL></DD></DL><HR><A NAME="getScale()"><!-- --></A><H3>getScale</H3><PRE>public double <B>getScale</B>()</PRE><DL><DD>Returns the scale factor, or <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Double.html#NaN" title="class or interface in java.lang"><CODE>NaN</CODE></A> if the scale is unknow. The scale factor is usually smaller than 1. For example for a 1:1000 scale, the scale factor will be 0.001. This scale factor takes in account the physical size of the rendering device (e.g. the screen size) if such information is available. Note that this scale can't be more accurate than the <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/GraphicsConfiguration.html#getNormalizingTransform()" title="class or interface in java.awt">information supplied by the underlying system</A>.<P><DD><DL><DT><B>Returns:</B><DD>The rendering scale factor as a number between 0 and 1, or <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Double.html#NaN" title="class or interface in java.lang"><CODE>Double.NaN</CODE></A>.<DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getScale()"><CODE>ReferencedCanvas.getScale()</CODE></A></DL></DD></DL><HR><A NAME="isPrinting()"><!-- --></A><H3>isPrinting</H3><PRE>public boolean <B>isPrinting</B>()</PRE><DL><DD>Returns  if the output device is a printer instead of screen. When printing, graphic primitives should block until all data are available instead of painting only available data and invoke <A HREF="../../../../org/geotools/display/canvas/ReferencedGraphic2D.html#refresh()"><CODE>ReferencedGraphic2D.refresh()</CODE></A> later.<P><DD><DL></DL></DD></DL><HR><A NAME="addPaintedArea(java.awt.Shape)"><!-- --></A><H3>addPaintedArea</H3><PRE>public void <B>addPaintedArea</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Shape.html" title="class or interface in java.awt">Shape</A>&nbsp;area)</PRE><DL><DD>Declares that an area has been painted in the <A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#getGraphics()">graphics handler</A>. The coordinate reference system for  is infered from the <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Graphics2D.html#getTransform()" title="class or interface in java.awt">current affine transform</A> set in the graphic handler. Invoking this method is equivalents to invoking <code><A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#addPaintedArea(java.awt.Shape, org.opengis.referencing.crs.CoordinateReferenceSystem)">addPaintedArea</A>(area, null)</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>area</CODE> - A bounding shape of the area just painted. This shape may be approximative,        as long as it completely encloses the painted area. Simple shapes with fast         and  methods are encouraged.<DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#addPaintedArea(java.awt.Shape, org.opengis.referencing.crs.CoordinateReferenceSystem)"><CODE>addPaintedArea(Shape, CoordinateReferenceSystem)</CODE></A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Graphics2D.html#getTransform()" title="class or interface in java.awt"><CODE>Graphics2D.getTransform()</CODE></A></DL></DD></DL><HR><A NAME="addPaintedArea(java.awt.Shape, org.opengis.referencing.crs.CoordinateReferenceSystem)"><!-- --></A><H3>addPaintedArea</H3><PRE>public void <B>addPaintedArea</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Shape.html" title="class or interface in java.awt">Shape</A>&nbsp;area,                           CoordinateReferenceSystem&nbsp;crs)                    throws TransformException</PRE><DL><DD>Declares that an area has been painted. This method should be invoked from <A HREF="../../../../org/geotools/display/canvas/GraphicPrimitive2D.html#paint(org.geotools.display.canvas.RenderingContext)"><CODE>GraphicPrimitive2D.paint(org.geotools.display.canvas.RenderingContext)</CODE></A> at rendering time. <A HREF="../../../../org/geotools/display/canvas/BufferedCanvas2D.html" title="class in org.geotools.display.canvas"><CODE>BufferedCanvas2D</CODE></A> uses this information in order to determine which graphic primitives need to be repainted when a screen area is damaged. If  methods are never invoked from a particular <A HREF="../../../../org/geotools/display/canvas/GraphicPrimitive2D.html" title="class in org.geotools.display.canvas"><CODE>GraphicPrimitive2D</CODE></A>, then the canvas will assumes that the painted area is unknow and conservatively repaint all graphic primitives during subsequent rendering.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>area</CODE> - A bounding shape of the area just painted. This shape may be approximative,         as long as it completely encloses the painted area. Simple shapes with fast          and  methods are encouraged.<DD><CODE>crs</CODE> - The coordinate reference system for , or  to infer it         from the <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Graphics2D.html#getTransform()" title="class or interface in java.awt">current affine transform</A> set in the         graphic handler.<DT><B>Throws:</B><DD><CODE>TransformException</CODE> - if  coordinates can't be transformed.</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/RenderingContext.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/ReferencedGraphic2D.html" title="class in org.geotools.display.canvas"><B>PREV CLASS</B></A>&nbsp;&nbsp;NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="RenderingContext.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="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&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 + -