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

📄 renderingcontext.html

📁 Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理信息系统。Geotools提供了OGC(Open Geospatial Consortium)规范的一个实现来作为他们的
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Declares that an area has been painted. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<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></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#getAffineTransform(org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.crs.CoordinateReferenceSystem)">getAffineTransform</A></B>(CoordinateReferenceSystem&nbsp;sourceCRS,                   CoordinateReferenceSystem&nbsp;targetCRS)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an affine transform between two coordinate reference systems. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Graphics2D.html" title="class or interface in java.awt">Graphics2D</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#getGraphics()">getGraphics</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the graphics where painting occurs. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;MathTransform</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#getMathTransform(org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.crs.CoordinateReferenceSystem)">getMathTransform</A></B>(CoordinateReferenceSystem&nbsp;sourceCRS,                 CoordinateReferenceSystem&nbsp;targetCRS)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a transform between two coordinate systems. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Shape.html" title="class or interface in java.awt">Shape</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#getPaintingArea(org.opengis.referencing.crs.CoordinateReferenceSystem)">getPaintingArea</A></B>(CoordinateReferenceSystem&nbsp;crs)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the painting area in the specified coordinate reference system. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#getScale()">getScale</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#isPrinting()">isPrinting</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns  if the output device is a printer instead of screen. </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="../../../../org/geotools/display/canvas/RenderingContext.html#setGraphicsCRS(org.opengis.referencing.crs.CoordinateReferenceSystem)">setGraphicsCRS</A></B>(CoordinateReferenceSystem&nbsp;crs)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the coordinate reference system in use for rendering in <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>. </TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="objectiveCRS"><!-- --></A><H3>objectiveCRS</H3><PRE>public final CoordinateReferenceSystem <B>objectiveCRS</B></PRE><DL><DD>A snapshot of <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getObjectiveCRS()"><CODE>ReferencedCanvas.getObjectiveCRS()</CODE></A> at the time of painting. This is the "real world" coordinate reference system that the user will see on the screen. Data from all <A HREF="../../../../org/geotools/display/canvas/GraphicPrimitive2D.html" title="class in org.geotools.display.canvas"><CODE>GraphicPrimitive2D</CODE></A> must be transformed to this CRS before to be painted. Units are usually "real world" metres. <p> This coordinate system is usually set once for a given <A HREF="../../../../org/geotools/display/canvas/BufferedCanvas2D.html" title="class in org.geotools.display.canvas"><CODE>BufferedCanvas2D</CODE></A> and do not change anymore, except if the user wants to change the projection see on screen.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#displayCRS"><CODE>displayCRS</CODE></A>, <A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#setGraphicsCRS(org.opengis.referencing.crs.CoordinateReferenceSystem)"><CODE>setGraphicsCRS(org.opengis.referencing.crs.CoordinateReferenceSystem)</CODE></A>, <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getObjectiveCRS()"><CODE>ReferencedCanvas.getObjectiveCRS()</CODE></A></DL></DL><HR><A NAME="displayCRS"><!-- --></A><H3>displayCRS</H3><PRE>public final CoordinateReferenceSystem <B>displayCRS</B></PRE><DL><DD>A snapshot of <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getDisplayCRS()"><CODE>ReferencedCanvas.getDisplayCRS()</CODE></A> at the time of painting. This CRS maps the <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Graphics2D.html" title="class or interface in java.awt">user space</A> in terms of <cite>Java2D</cite>: each "unit" is a dot (about 1/72 of inch). <var>x</var> values increase toward the right of the screen and <var>y</var> values increase toward the bottom of the screen. This CRS is appropriate for rendering text and labels. <p> This coordinate system may be different between two different renderings, especially if the zoom (or map scale) has changed since the last rendering.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#objectiveCRS"><CODE>objectiveCRS</CODE></A>, <A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#setGraphicsCRS(org.opengis.referencing.crs.CoordinateReferenceSystem)"><CODE>setGraphicsCRS(org.opengis.referencing.crs.CoordinateReferenceSystem)</CODE></A>, <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getDisplayCRS()"><CODE>ReferencedCanvas.getDisplayCRS()</CODE></A></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getGraphics()"><!-- --></A><H3>getGraphics</H3><PRE>public final <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Graphics2D.html" title="class or interface in java.awt">Graphics2D</A> <B>getGraphics</B>()</PRE><DL><DD>Returns the graphics where painting occurs. The initial coordinate reference system is <A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#displayCRS"><CODE>displayCRS</CODE></A>, which maps the <cite>Java2D</cite> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Graphics2D.html" title="class or interface in java.awt">user space</A>. For drawing shapes directly in terms of "real world" coordinates, users should invoke <code><A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#setGraphicsCRS(org.opengis.referencing.crs.CoordinateReferenceSystem)">setGraphicsCRS</A>(<A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#objectiveCRS">objectiveCRS</A>)</code>.<P><DD><DL></DL></DD></DL><HR><A NAME="getPaintingArea(org.opengis.referencing.crs.CoordinateReferenceSystem)"><!-- --></A><H3>getPaintingArea</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Shape.html" title="class or interface in java.awt">Shape</A> <B>getPaintingArea</B>(CoordinateReferenceSystem&nbsp;crs)                      throws TransformException</PRE><DL><DD>Returns the painting area in the specified coordinate reference system. If the CRS is <A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#displayCRS"><CODE>displayCRS</CODE></A>, then this method will usually returns the widget's bounds (<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Component.html#getBounds()" title="class or interface in java.awt"><CODE>Component.getBounds()</CODE></A>).<P><DD><DL><DT><B>Parameters:</B><DD><CODE>crs</CODE> - The coordinate reference system (usually one of <A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#displayCRS"><CODE>displayCRS</CODE></A> or         <A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#objectiveCRS"><CODE>objectiveCRS</CODE></A>).<DT><B>Returns:</B><DD>The painting area in terms of the specified CRS.<DT><B>Throws:</B><DD><CODE>TransformException</CODE> - if the painting area can be expressed in the specified CRS.</DL></DD></DL><HR><A NAME="setGraphicsCRS(org.opengis.referencing.crs.CoordinateReferenceSystem)"><!-- --></A><H3>setGraphicsCRS</H3><PRE>public void <B>setGraphicsCRS</B>(CoordinateReferenceSystem&nbsp;crs)                    throws TransformException</PRE><DL><DD>Sets the coordinate reference system in use for rendering in <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>. Invoking this method do not alter the current state of any canvas or GO-1 graphic objects. It is only a convenient way to <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Graphics2D.html#setTransform(java.awt.geom.AffineTransform)" title="class or interface in java.awt">set the affine transform</A> in the current <cite>Java2D</cite> <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> handle, for example in order to alternate rendering mode between geographic features and labels. The specified coordinate reference system (the  argument) is usually (but not limited to) one of <A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#objectiveCRS"><CODE>objectiveCRS</CODE></A> or <A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#displayCRS"><CODE>displayCRS</CODE></A> values.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>crs</CODE> - The CRS for the <A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#getGraphics()"><CODE>Java2D graphics handle</CODE></A>.<DT><B>Throws:</B><DD><CODE>TransformException</CODE> - if this method failed to find an affine transform from the         specified CRS to the device CRS.<DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/display/canvas/RenderingContext.html#getGraphics()"><CODE>getGraphics()</CODE></A>, <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="http://java.sun.com/j2se/1.4/docs/api/java/awt/Graphics2D.html#setTransform(java.awt.geom.AffineTransform)" title="class or interface in java.awt"><CODE>Graphics2D.setTransform(java.awt.geom.AffineTransform)</CODE></A></DL></DD></DL><HR><A NAME="getAffineTransform(org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.crs.CoordinateReferenceSystem)"><!-- --></A><H3>getAffineTransform</H3>

⌨️ 快捷键说明

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