Skip to content

WpfRasterSource

Namespace: ThinkGeo.UI.Wpf

This class allows you to view standard image types such as BMP, JPG, and PNG, using wpf classes such as BitmapSource

public class WpfRasterSource : ThinkGeo.Core.RasterSource

Inheritance Object → RasterSource → WpfRasterSource

Remarks:

This class handles all default supported image types of Windows. Any image can be opened by ImageView on Windows can also be opened by this class. As none of these types embed geographic information in them, you will need to ensure that the image file is always accompanied by a world file. The world file is text file that stores the associated geographic information we need to properly display the image along with your other feature data.

Properties

ImagePathFilename

public string ImagePathFilename { get; set; }

Property Value

String

ProjectionConverter

public ProjectionConverter ProjectionConverter { get; set; }

Property Value

ProjectionConverter

Projection

public Projection Projection { get; protected set; }

Property Value

Projection

Transparency

public float Transparency { get; set; }

Property Value

Single

BlueTranslation

public float BlueTranslation { get; set; }

Property Value

Single

RedTranslation

public float RedTranslation { get; set; }

Property Value

Single

GreenTranslation

public float GreenTranslation { get; set; }

Property Value

Single

IsNegative

public bool IsNegative { get; set; }

Property Value

Boolean

IsGrayscale

public bool IsGrayscale { get; set; }

Property Value

Boolean

ScaleFactor

public double ScaleFactor { get; set; }

Property Value

Double

IsOpen

public bool IsOpen { get; protected set; }

Property Value

Boolean

Constructors

WpfRasterSource()

public WpfRasterSource()

WpfRasterSource(String)

public WpfRasterSource(string imagePathFilename)

Parameters

imagePathFilename String

WpfRasterSource(String, String)

public WpfRasterSource(string imagePathFilename, string worldFilePathFilename)

Parameters

imagePathFilename String

worldFilePathFilename String

WpfRasterSource(String, RectangleShape)

public WpfRasterSource(string imagePathFilename, RectangleShape imageExtent)

Parameters

imagePathFilename String

imageExtent RectangleShape

Methods

OnStreamLoading(StreamLoadingEventArgs)

protected void OnStreamLoading(StreamLoadingEventArgs e)

Parameters

e StreamLoadingEventArgs

GetImageWidthCore()

protected int GetImageWidthCore()

Returns

Int32

GetImageHeightCore()

protected int GetImageHeightCore()

Returns

Int32

OpenCore()

protected void OpenCore()

CloseCore()

protected void CloseCore()

GetImageCore(RectangleShape, Int32, Int32)

protected GeoImage GetImageCore(RectangleShape worldExtent, int canvasWidth, int canvasHeight)

Parameters

worldExtent RectangleShape

canvasWidth Int32

canvasHeight Int32

Returns

GeoImage

GetBoundingBoxCore()

protected RectangleShape GetBoundingBoxCore()

Returns

RectangleShape

Events

StreamLoading

public event EventHandler<StreamLoadingEventArgs> StreamLoading;

OpeningRasterSource

public event EventHandler<OpeningRasterSourceEventArgs> OpeningRasterSource;

OpenedRasterSource

public event EventHandler<OpenedRasterSourceEventArgs> OpenedRasterSource;

ClosingRasterSource

public event EventHandler<ClosingRasterSourceEventArgs> ClosingRasterSource;

ClosedRasterSource

public event EventHandler<ClosedRasterSourceEventArgs> ClosedRasterSource;