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¶
PivotX¶
public double PivotX { get; set; }
Property Value¶
PivotY¶
public double PivotY { get; set; }
Property Value¶
ScaleFactor¶
public float ScaleFactor { get; }
Property Value¶
CurrentScale¶
public double CurrentScale { get; }
Property Value¶
FontDisplayDensity¶
public double FontDisplayDensity { get; }
Property Value¶
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¶
Height¶
public float Height { get; protected set; }
Property Value¶
CurrentWorldExtent¶
public RectangleShape CurrentWorldExtent { get; protected set; }
Property Value¶
RectangleShape
SupportKeyColor¶
public bool SupportKeyColor { get; }
Property Value¶
KeyColors¶
public Collection<GeoColor> KeyColors { get; }
Property Value¶
NativeImage¶
public object NativeImage { get; }
Property Value¶
IsDrawing¶
public bool IsDrawing { get; protected set; }
Property Value¶
Dpi¶
public float Dpi { get; set; }
Property Value¶
CancellationToken¶
public CancellationToken CancellationToken { get; set; }
Property Value¶
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()¶
This returns the virtual width (instead of physical width) of the canvas, the scale factor of this geoCanvas is always 1.
protected float GetCanvasWidthCore()
Returns¶
GetCanvasHeightCore()¶
This returns the virtual height (instead of physical height) of the canvas, the scale factor of this geoCanvas is always 1.
protected float GetCanvasHeightCore()
Returns¶
EndDrawingCore()¶
Ends the drawing session.
protected void EndDrawingCore()
FlushCore()¶
Flushes any pending drawing operations.
protected void FlushCore()
Events¶
DrawingProgressChanged¶
public event EventHandler<DrawingProgressChangedEventArgs> DrawingProgressChanged;