mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-06 06:55:04 +00:00
Version 4.12. Added MapControl.Images project
This commit is contained in:
parent
f585377c34
commit
05a995c592
2 changed files with 12 additions and 15 deletions
|
|
@ -29,16 +29,6 @@ namespace MapControl.Images
|
|||
"Path", typeof(string), typeof(WorldFileImage),
|
||||
new PropertyMetadata(null, async (o, e) => (await ReadWorldFileImage((string)e.NewValue)).SetImage((Image)o)));
|
||||
|
||||
public static string GetPath(Image image)
|
||||
{
|
||||
return (string)image.GetValue(PathProperty);
|
||||
}
|
||||
|
||||
public static void SetPath(Image image, string path)
|
||||
{
|
||||
image.SetValue(PathProperty, path);
|
||||
}
|
||||
|
||||
public BitmapSource Bitmap { get; }
|
||||
public Matrix Transform { get; }
|
||||
public MapProjection Projection { get; }
|
||||
|
|
@ -77,6 +67,16 @@ namespace MapControl.Images
|
|||
};
|
||||
}
|
||||
|
||||
public static string GetPath(Image image)
|
||||
{
|
||||
return (string)image.GetValue(PathProperty);
|
||||
}
|
||||
|
||||
public static void SetPath(Image image, string path)
|
||||
{
|
||||
image.SetValue(PathProperty, path);
|
||||
}
|
||||
|
||||
public static async Task<WorldFileImage> ReadWorldFileImage(string imagePath, string worldFilePath, string projFilePath = null)
|
||||
{
|
||||
BitmapSource bitmap;
|
||||
|
|
@ -181,9 +181,6 @@ namespace MapControl.Images
|
|||
return image;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Experimental
|
||||
/// </summary>
|
||||
public static async Task<FrameworkElement> CreateImage(string imagePath)
|
||||
{
|
||||
return (await ReadWorldFileImage(imagePath)).CreateImage();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue