Interface IPluginMapCoordinateConverter
- Namespace
- AcDream.Plugin.Abstractions
- Assembly
- AcDream.Plugin.Abstractions.dll
Converts canonical world coordinates to and from a map image.
public interface IPluginMapCoordinateConverter
Properties
WorldBounds
The part of the world the whole image covers.
PluginMapViewport WorldBounds { get; }
Property Value
Methods
PixelToWorld(PluginMapPixel, double, double)
Which world point a pixel of an image of the given size shows.
PluginMapPoint PixelToWorld(PluginMapPixel pixel, double imageWidth, double imageHeight)
Parameters
pixelPluginMapPixelThe pixel position.
imageWidthdoubleThe image's width in pixels.
imageHeightdoubleThe image's height in pixels.
Returns
- PluginMapPoint
The world point. It carries no elevation.
WorldToPixel(PluginMapPoint, double, double)
Where a world point falls on an image of the given size.
PluginMapPixel WorldToPixel(PluginMapPoint world, double imageWidth, double imageHeight)
Parameters
worldPluginMapPointThe world point.
imageWidthdoubleThe image's width in pixels.
imageHeightdoubleThe image's height in pixels.
Returns
- PluginMapPixel
The pixel position; outside the image when the point is outside WorldBounds.