Table of Contents

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

PluginMapViewport

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

pixel PluginMapPixel

The pixel position.

imageWidth double

The image's width in pixels.

imageHeight double

The 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

world PluginMapPoint

The world point.

imageWidth double

The image's width in pixels.

imageHeight double

The image's height in pixels.

Returns

PluginMapPixel

The pixel position; outside the image when the point is outside WorldBounds.