ArcObjects Library Reference (Display)  

IDisplayTransformation Interface

Provides access to members that control Display Transformation.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

When To Use

Use IDisplayTransformation for converting coordinates between real-world and device space and back.  To prepare a transform for use, follow these steps:

  1. Set the full map extent with the Bounds property
  2. Set the visible map extent (zoom rectangle) with the VisibleBounds property
  3. Set the output area of the device using the DeviceFrame property
  4. Set the resolution of the output device using the Resolution property

The transform is based on the ratio between the VisibleBounds and the DeviceFrame.  Normally the DeviceFrame is simply the full extent of the device with the origin equal to 0,0. 

The transform object calculates the FittedBounds automatically and this is the visible map extent adjusted to fit the device.

Members

Description
Read/write property Bounds Full extent in world coordinates.
Read-only property ConstrainedBounds Intersection of Bounds and VisibleBounds.
Read/write property DeviceFrame Visible extent in device coordinates.
Read-only property FittedBounds Device frame in world coordinates.
Method FromMapPoint Calculates device coordinates corresponding to the map point.
Method FromPoints Calculates a map distance corresponding to a point (1/72) distance.
Read/write property ReferenceScale Reference scale for computing scaled symbol sizes.
Read/write property Resolution Resolution of the device in dots (pixels) per inch.
Read/write property Rotation Rotation angle in degrees.
Read/write property ScaleRatio Scale between FittedBounds and DeviceFrame.
Read/write property SpatialReference Current spatial reference.
Read/write property SuppressEvents Indicates if transformation object suppresses events.
Method ToMapPoint Calculates a point in map coordinates corresponding to the device point.
Method ToPoints Calculates a distance in points (1/72 inch) corresponding to the map distance.
Method TransformCoords Transforms a set of points or measurements from device to world space or vice versa. Use the flags specified by esriDisplayTransformEnum.
Method TransformMeasuresFF Transforms floating point measures to floating point measures (or do the inverse).
Method TransformMeasuresFI Transforms floating point measures to integer measures (or do the inverse).
Method TransformMeasuresIF Transforms integer measures to floating point measures (or do the inverse).
Method TransformMeasuresII Transforms integer measures to integer measures (or do the inverse).
Method TransformPointsFF Transforms floating point points to floating point points (or do the inverse).
Method TransformPointsFI Transforms floating point points to integer points (or do the inverse).
Method TransformPointsIF Transforms integer points to floating point points (or do the inverse).
Method TransformPointsII Transforms integer points to integer points (or do the inverse).
Method TransformRect Transforms a rectangle from device to world space or vice versa. Use the flags specified by esriDisplayTransformEnum.
Read/write property Units Units used by world coordinates.
Read/write property VisibleBounds Visible extent in world coordinates.
Read/write property ZoomResolution Indicates if resolution is tied to visible bounds. If true, zooming in magnifies contents (i.e., zoom in on page).

Inherited Interfaces

Interfaces Description
ITransformation Provides access to members that apply a function (or its inverse) to a set of points or measures. The suffix of each method indicates the type of parameters operated on.

CoClasses that implement IDisplayTransformation

CoClasses and Classes Description
DisplayTransformation Display transformation class for converting from world to device units.

Remarks

Obtain an IDisplayTransformation reference to the DisplayTransformation object from IDisplay::DisplayTransformation. Because IScreenDisplay inherits from IDisplay, you can also use IScreenDisplay::DisplayTransformation.

Each DisplayTransformation manages a coordinate system object such as a GeographicCoordinateSystem or ProjectedCoordinateSystem. Obtain a reference to the display's coordinate system object using IDisplayTransformation::SpatialReference.

The DisplayTransformation of a PageLayout object does not have a spatial reference and translates between device units and page units.

.NET Snippets

Convert Display Pixels to Map Units | Get Screen Coordinates from Map Coordinates | Get Map Coordinates from Screen Coordinates | Draw Point |

.NET Samples

Building a MapViewer application using the ArcGIS Engine controls (Code Files: MapViewer) | Copy the PageLayoutControl focus map and overwrite the MapControl map (Code Files: CopyFocusMap) | Custom map selection commands (Code Files: SelectFeatures) | Dynamic display layer (Code Files: MyDynamicLayerClass) | Dynamic displaytracking dynamic object (Code Files: TrackObject) | Implementing a schematic digitizing tool (Code Files: DigitTool) | RSS weather layer (Code Files: AddWeatherItemTool RSSWeatherLayerClass) | Time Series Graph tool add-in (Code Files: TimeSeriesGraph) | Triangle graphic element (Code Files: TriangleElementClass) |

.NET Related Topics

Building a map viewing application using the ArcGIS Engine controls | Creating custom symbols | How to draw a point on the screen | How to get map coordinates from screen coordinates | How to get screen coordinates from map coordinates | Performing map selection | Transforming envelopes in the display | Working with PageLayout elements |