Skip to content

WpfDrawingGeoCanvas

Namespace: ThinkGeo.UI.Wpf

WPF implementation of GeoCanvas that uses a GeoGraphicsView for drawing. Implements IGeoCanvasRotatable to support rotation of drawing operations.

public class WpfDrawingGeoCanvas : ThinkGeo.Core.GeoCanvas, ThinkGeo.Core.IGeoCanvasRotatable

Inheritance Object → GeoCanvas → WpfDrawingGeoCanvas
Implements IGeoCanvasRotatable

Properties

RotationAngle

public double RotationAngle { get; set; }

Property Value

Double

PivotX

public double PivotX { get; set; }

Property Value

Double

PivotY

public double PivotY { get; set; }

Property Value

Double

CurrentScale

public double CurrentScale { get; }

Property Value

Double

FontDisplayDensity

public double FontDisplayDensity { get; }

Property Value

Double

DrawingQuality

public DrawingQuality DrawingQuality { get; set; }

Property Value

DrawingQuality

MapUnit

public GeographyUnit MapUnit { get; }

Property Value

GeographyUnit

Width

public float Width { get; protected set; }

Property Value

Single

Height

public float Height { get; protected set; }

Property Value

Single

CurrentWorldExtent

public RectangleShape CurrentWorldExtent { get; protected set; }

Property Value

RectangleShape

SupportKeyColor

public bool SupportKeyColor { get; }

Property Value

Boolean

KeyColors

public Collection<GeoColor> KeyColors { get; }

Property Value

Collection<GeoColor>

NativeImage

public object NativeImage { get; }

Property Value

Object

IsDrawing

public bool IsDrawing { get; protected set; }

Property Value

Boolean

Dpi

public float Dpi { get; set; }

Property Value

Single

ScaleFactor

public float ScaleFactor { get; set; }

Property Value

Single

CancellationToken

public CancellationToken CancellationToken { get; set; }

Property Value

CancellationToken

ClippingArea

public RectangleShape ClippingArea { get; set; }

Property Value

RectangleShape

Constructors

WpfDrawingGeoCanvas()

public WpfDrawingGeoCanvas()

Methods

DrawArcCore(GeoPen, Single, Single, Single, Single, Single, Single, DrawingLevel)

Draws an arc. (Not implemented)

protected void DrawArcCore(GeoPen pen, float x, float y, float width, float height, float startAngle, float sweepAngle, DrawingLevel drawingLevel)

Parameters

pen GeoPen

x Single

y Single

width Single

height Single

startAngle Single

sweepAngle Single

drawingLevel DrawingLevel

DrawAreaCore(IEnumerable<ScreenPointF[]>, GeoPen, GeoBrush, DrawingLevel, Single, Single, PenBrushDrawingOrder)

Draws a filled/stroked polygon (area) by transforming each set of points.

protected void DrawAreaCore(IEnumerable<ScreenPointF[]> screenPoints, GeoPen outlinePen, GeoBrush fillBrush, DrawingLevel drawingLevel, float xOffset, float yOffset, PenBrushDrawingOrder penBrushDrawingOrder)

Parameters

screenPoints IEnumerable<ScreenPointF[]>

outlinePen GeoPen

fillBrush GeoBrush

drawingLevel DrawingLevel

xOffset Single

yOffset Single

penBrushDrawingOrder PenBrushDrawingOrder

DrawLineCore(IEnumerable<ScreenPointF>, GeoPen, DrawingLevel, Single, Single)

Draws a polyline by applying rotation to the provided screen points.

protected void DrawLineCore(IEnumerable<ScreenPointF> screenPoints, GeoPen linePen, DrawingLevel drawingLevel, float xOffset, float yOffset)

Parameters

screenPoints IEnumerable<ScreenPointF>

linePen GeoPen

drawingLevel DrawingLevel

xOffset Single

yOffset Single

DrawEllipseCore(ScreenPointF, Single, Single, GeoPen, GeoBrush, DrawingLevel, Single, Single, PenBrushDrawingOrder)

Draws an ellipse at the given screen point.

protected void DrawEllipseCore(ScreenPointF screenPoint, float width, float height, GeoPen outlinePen, GeoBrush fillBrush, DrawingLevel drawingLevel, float xOffset, float yOffset, PenBrushDrawingOrder penBrushDrawingOrder)

Parameters

screenPoint ScreenPointF

width Single

height Single

outlinePen GeoPen

fillBrush GeoBrush

drawingLevel DrawingLevel

xOffset Single

yOffset Single

penBrushDrawingOrder PenBrushDrawingOrder

DrawScreenImageWithoutScalingCore(GeoImage, Single, Single, DrawingLevel, Single, Single, Single)

Draws an image without scaling. (Not implemented)

protected void DrawScreenImageWithoutScalingCore(GeoImage image, float centerXInScreen, float centerYInScreen, DrawingLevel drawingLevel, float xOffset, float yOffset, float rotateAngle)

Parameters

image GeoImage

centerXInScreen Single

centerYInScreen Single

drawingLevel DrawingLevel

xOffset Single

yOffset Single

rotateAngle Single

DrawScreenImageCore(GeoImage, Single, Single, Single, Single, DrawingLevel, Single, Single, Single)

Draws an image with scaling. (Not implemented)

protected void DrawScreenImageCore(GeoImage image, float centerXInScreen, float centerYInScreen, float widthInScreen, float heightInScreen, DrawingLevel drawingLevel, float xOffset, float yOffset, float rotateAngle)

Parameters

image GeoImage

centerXInScreen Single

centerYInScreen Single

widthInScreen Single

heightInScreen Single

drawingLevel DrawingLevel

xOffset Single

yOffset Single

rotateAngle Single

DrawTextCore(String, GeoFont, GeoBrush, GeoPen, IEnumerable<ScreenPointF>, DrawingLevel, Single, Single, DrawingTextAlignment, Single)

Draws text by delegating to the GeoGraphicsView.

protected void DrawTextCore(string text, GeoFont font, GeoBrush fillBrush, GeoPen haloPen, IEnumerable<ScreenPointF> textPathInScreen, DrawingLevel drawingLevel, float xOffset, float yOffset, DrawingTextAlignment drawingTextAlignment, float rotateAngle)

Parameters

text String

font GeoFont

fillBrush GeoBrush

haloPen GeoPen

textPathInScreen IEnumerable<ScreenPointF>

drawingLevel DrawingLevel

xOffset Single

yOffset Single

drawingTextAlignment DrawingTextAlignment

rotateAngle Single

MeasureTextCore(String, GeoFont)

Estimates the size of text using a basic heuristic.

protected DrawingRectangleF MeasureTextCore(string text, GeoFont font)

Parameters

text String

font GeoFont

Returns

DrawingRectangleF

BeginDrawingCore(Object, RectangleShape, GeographyUnit)

Begins a drawing session by initializing the GeoGraphicsView.

protected void BeginDrawingCore(object nativeImage, RectangleShape worldExtent, GeographyUnit drawingMapUnit)

Parameters

nativeImage Object

worldExtent RectangleShape

drawingMapUnit GeographyUnit

GetCanvasWidthCore()

Returns the width of the drawing canvas.

protected float GetCanvasWidthCore()

Returns

Single

GetCanvasHeightCore()

Returns the height of the drawing canvas.

protected float GetCanvasHeightCore()

Returns

Single

EndDrawingCore()

Ends the drawing session.

protected void EndDrawingCore()

FlushCore()

Flushes any pending drawing operations.

protected void FlushCore()

Events

DrawingProgressChanged

public event EventHandler<DrawingProgressChangedEventArgs> DrawingProgressChanged;