GeoCanvas¶
Namespace: ThinkGeo.Core
This class represents a view that is used to draw geographic shapes. It is intended to be inherited for the implementation of different drawing systems, such as GDI+ or WPF.
public abstract class GeoCanvas
Inheritance Object → GeoCanvas
Remarks:
This class allows you to implement different drawing systems, such as GDI+, GDI, or WPF. It can also be used for other systems, such as PDF.
The basic flow of the use of the class is to first call BeginDrawing and pass in an image along with its world extent.
Properties¶
CurrentScale¶
This property gets the current scale of the view.
public double CurrentScale { get; }
Property Value¶
Exceptions¶
InvalidOperationException
In the event you attempt to call this property when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
FontDisplayDensity¶
This property gets and sets the current device pixel ratio of platform. It would be used by scale text and icon from map. Android: it's "Application.Context.Resources.DisplayMetrics.Density". iOS: it's "UIScreen.MainScreen.Scale". Others: it's default value "1".
public double FontDisplayDensity { get; }
Property Value¶
DrawingQuality¶
This property returns the drawing quality when rendering on the GeoCanvas.
public DrawingQuality DrawingQuality { get; set; }
Property Value¶
Remarks:
The DrawingQuality specifies whether BaseLineShapes, BasePointShapes, and BaseAreaShapes use anti-aliasing methods or other techniques that control the quality. In some cases you may want a higher quality rendering, and in other cases higher speed is more desirable. It is up to the implementer of the derived GeoCanvas class to control exactly what this setting means.
MapUnit¶
This property returns the MapUnit passed in on the BeginDrawingAPI in the GeoCanvas.
public GeographyUnit MapUnit { get; }
Property Value¶
Width¶
This property gets the width of the view.
public float Width { get; protected set; }
Property Value¶
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
Remarks:
This property reflects the width of the view image that was passed in on BeginDrawing.
Height¶
This property gets the height of the view.
public float Height { get; protected set; }
Property Value¶
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
Remarks:
This property reflects the height of the view image that was passed in on BeginDrawing.
CurrentWorldExtent¶
This property gets the adjusted current extent based on what was set when BeginDrawing was called.
public RectangleShape CurrentWorldExtent { get; protected set; }
Property Value¶
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
Remarks:
The extent that gets passed in on BeginDrawing is adjusted for the height and width of the physical media being drawn on. For example if the current extent is wider than taller but the bitmap being drawn on is square then the current extent needs to be adjusted. The extent will be adjusted larger so that we ensure that the entire original extent will still be represented.
SupportKeyColor¶
This property indicates whether a GeoCanvas has the KeyColor or not. If it has no KeyColor, it will throw an exception when you get or set the value of KeyColors property.
public bool SupportKeyColor { get; }
Property Value¶
Remarks:
The default value is false.
KeyColors¶
Gets a value represents a collection of key colors. If SupportKeyColor property is false, it will throw exception when you use KeyColors.
public Collection<GeoColor> KeyColors { get; }
Property Value¶
Remarks:
It will make these colors transparent when draw image.
NativeImage¶
The same reference to the parameter 'NativeImage' in BeginDrawing function.
public object NativeImage { get; }
Property Value¶
IsDrawing¶
This property gets the drawing status of the GeoCanvas.
public bool IsDrawing { get; protected set; }
Property Value¶
Remarks:
This property is set to true when the BeginDrawing method is called, and false after the EndDrawing method is called.
Dpi¶
The DPI value for the final drawing result, only valid when HasDpi set to true.
public float Dpi { get; set; }
Property Value¶
ScaleFactor¶
Gets or sets the scale factor, this is a value number of device pixels per logical coordinate point.
public float ScaleFactor { get; set; }
Property Value¶
The scale factory value.
Remarks:
The coordinate space used by application developers is measured in logical points. High-resolution (Retina) displays will have more than a single physical pixel per logical point and this property specifies the scale factor.
CancellationToken¶
Gets or sets the cancellation token source.
public CancellationToken CancellationToken { get; set; }
Property Value¶
The cancellation token source.
ClippingArea¶
It's a property only used in printing related Canvas such as PdfGeoCanvas and PrinterGeoCanvas
public RectangleShape ClippingArea { get; set; }
Property Value¶
Methods¶
EndDrawingCore()¶
This method ends drawing and commits the drawing on the GeoCanvas.
protected abstract void EndDrawingCore()
Remarks:
This methods should be called when you are finished drawing. It will commit the image changes to the image you passed in on BeginDrawing. It will also set IsDrawing to false. After you call this method it will put the GeoCanvas into an invalid state, so if you then call any drawing methods it will raise an exception.
Flush()¶
This method flush drawing and commits the drawing on the GeoCanvas.
public void Flush()
Remarks:
This method should be called when you are finished drawing. It will commit the image changes to the image you passed in on BeginDrawing. It will also set IsDrawing to false. After you call this method it will put the GeoCanvas into an invalid state, so if you then call any drawing methods it will raise an exception.
FlushCore()¶
This method flush drawing and commits the drawing on the GeoCanvas.
protected abstract void FlushCore()
Remarks:
This method should be called when you are finished drawing. It will commit the image changes to the image you passed in on BeginDrawing. It will also set IsDrawing to false. After you call this method it will put the GeoCanvas into an invalid state, so if you then call any drawing methods it will raise an exception.
OnDrawingProgressChanged(DrawingProgressChangedEventArgs)¶
Raises the event.
protected void OnDrawingProgressChanged(DrawingProgressChangedEventArgs e)
Parameters¶
e
DrawingProgressChangedEventArgs
The instance containing the event data.
MeasureOffset(Double)¶
public double MeasureOffset(double offsetInPixel)
Parameters¶
offsetInPixel
Double
Returns¶
MeasureOffsetCore(Double)¶
protected double MeasureOffsetCore(double offsetInPixel)
Parameters¶
offsetInPixel
Double
Returns¶
ToWorldCoordinate(DrawingRectangleF)¶
internal RectangleShape ToWorldCoordinate(DrawingRectangleF drawingRectangle)
Parameters¶
drawingRectangle
DrawingRectangleF
Returns¶
CalculateYOffsetWithTextBaseline(GeoFont, DrawingTextBaseline, String)¶
internal float CalculateYOffsetWithTextBaseline(GeoFont font, DrawingTextBaseline textBaseline, string text)
Parameters¶
font
GeoFont
textBaseline
DrawingTextBaseline
text
String
Returns¶
Clear(GeoBrush)¶
This method clears the current GeoCanvas using the color specified.
public void Clear(GeoBrush fillBrush)
Parameters¶
fillBrush
GeoBrush
Remarks:
Use this method to clear the GeoCanvas.
ClearCore(GeoBrush)¶
This method clears the current GeoCanvas using the color specified.
protected void ClearCore(GeoBrush fillBrush)
Parameters¶
fillBrush
GeoBrush
This parameter specifies the the brush that will be used to clear the GeoCanvas.
Remarks:
Use this method to clear the GeoCanvas.
This method is designed to be overridden by the deriving class.
DrawArc(GeoPen, DrawingRectangleF, Single, Single, DrawingLevel)¶
Draws the arc.
public void DrawArc(GeoPen pen, DrawingRectangleF rect, float startAngle, float sweepAngle, DrawingLevel drawingLevel)
Parameters¶
pen
GeoPen
The pen.
rect
DrawingRectangleF
The rect.
startAngle
Single
The start angle.
sweepAngle
Single
The sweep angle.
drawingLevel
DrawingLevel
The drawing level.
DrawArc(GeoPen, Single, Single, Single, Single, Single, Single, DrawingLevel)¶
Draws the arc.
public void DrawArc(GeoPen pen, float x, float y, float width, float height, float startAngle, float sweepAngle, DrawingLevel drawingLevel)
Parameters¶
pen
GeoPen
The pen.
x
Single
The x.
y
Single
The y.
width
Single
The width.
height
Single
The height.
startAngle
Single
The start angle.
sweepAngle
Single
The sweep angle.
drawingLevel
DrawingLevel
The drawing level.
DrawArcCore(GeoPen, Single, Single, Single, Single, Single, Single, DrawingLevel)¶
Draws the arc core.
protected abstract void DrawArcCore(GeoPen pen, float x, float y, float width, float height, float startAngle, float sweepAngle, DrawingLevel drawingLevel)
Parameters¶
pen
GeoPen
The pen.
x
Single
The x.
y
Single
The y.
width
Single
The width.
height
Single
The height.
startAngle
Single
The start angle.
sweepAngle
Single
The sweep angle.
drawingLevel
DrawingLevel
The drawing level.
DrawArea(Feature, GeoPen, DrawingLevel)¶
This method draws an area on the GeoCanvas.
public void DrawArea(Feature feature, GeoPen outlinePen, DrawingLevel drawingLevel)
Parameters¶
feature
Feature
This parameter is the area feature.
outlinePen
GeoPen
This parameter describes the outline GeoPen that will be used to draw the
area.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen will draw on.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the areaShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the areaShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the outlinePen, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw on the GeoCanvas. It provides you with a number of overloads that allow you to control how things are drawn. Specify the GeoBrush to fill in an area. Specify the GeoPen to outline an area using that GeoPen. You can also call an overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when you are drawing multiple areas. This is very useful when you want to draw a drop shadow, for example. In that case, you could draw the black backdrop on the lowest level with an offset, then draw the normal shape on a higher level without an offset.
DrawArea(AreaBaseShape, GeoPen, DrawingLevel)¶
This method draws an area on the GeoCanvas.
public void DrawArea(AreaBaseShape shape, GeoPen outlinePen, DrawingLevel drawingLevel)
Parameters¶
shape
AreaBaseShape
This parameter is the area shape.
outlinePen
GeoPen
This parameter describes the outline GeoPen that will be used to draw the
area.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen will draw on.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the areaShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the areaShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the outlinePen, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw on the GeoCanvas. It provides you with a number of overloads that allow you to control how things are drawn. Specify the GeoBrush to fill in an area. Specify the GeoPen to outline an area using that GeoPen. You can also call an overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when you are drawing multiple areas. This is very useful when you want to draw a drop shadow, for example. In that case, you could draw the black backdrop on the lowest level with an offset, then draw the normal shape on a higher level without an offset.
DrawArea(Feature, GeoBrush, DrawingLevel)¶
This method draws an area on the GeoCanvas.
public void DrawArea(Feature feature, GeoBrush fillBrush, DrawingLevel drawingLevel)
Parameters¶
feature
Feature
This parameter is the AreaShape in well-known binary format.
fillBrush
GeoBrush
This parameter describes the fill GeoBrush that will be used to draw the
AreaShape.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen will draw on.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the areaShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the areaShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw on the GeoCanvas. It provides you with a number of overloads that allow you to control how things are drawn. Specify the GeoBrush to fill in an area. Specify the GeoPen to outline an area using that GeoPen. You can also call an overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when you are drawing multiple areas. This is very useful when you want to draw a drop shadow, for example. In that case, you could draw the black backdrop on the lowest level with an offset, then draw the normal shape on a higher level without an offset.
DrawArea(AreaBaseShape, GeoBrush, DrawingLevel)¶
This method draws an area on the GeoCanvas.
public void DrawArea(AreaBaseShape shape, GeoBrush fillBrush, DrawingLevel drawingLevel)
Parameters¶
shape
AreaBaseShape
This parameter is the area shape to be drawn.
fillBrush
GeoBrush
This parameter describes the fill Brush that will be used to draw the
AreaShape.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen will draw on.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the areaShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the areaShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the outlinePen, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw on the GeoCanvas. It provides you with a number of overloads that allow you to control how things are drawn. Specify the GeoBrush to fill in an area. Specify the GeoPen to outline an area using that GeoPen. You can also call an overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when you are drawing multiple areas. This is very useful when you want to draw a drop shadow, for example. In that case, you could draw the black backdrop on the lowest level with an offset, then draw the normal shape on a higher level without an offset.
DrawArea(Feature, GeoPen, GeoBrush, DrawingLevel)¶
This method draws an area on the GeoCanvas.
public void DrawArea(Feature feature, GeoPen outlinePen, GeoBrush fillBrush, DrawingLevel drawingLevel)
Parameters¶
feature
Feature
This parameter is the AreaFeature to be drawn.
outlinePen
GeoPen
This parameter describes the outline GeoPen that will be used to draw the
AreaShape.
fillBrush
GeoBrush
This parameter describes the fill GeoBrush that will be used to draw the
AreaShape.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen will draw on.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the areaShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the areaShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the outlinePen, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw on the GeoCanvas. It provides you with a number of overloads that allow you to control how things are drawn. Specify the GeoBrush to fill in an area. Specify the GeoPen to outline an area using that GeoPen. You can also call an overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when you are drawing multiple areas. This is very useful when you want to draw a drop shadow, for example. In that case, you could draw the black backdrop on the lowest level with an offset, then draw the normal shape on a higher level without an offset.
DrawArea(AreaBaseShape, GeoPen, GeoBrush, DrawingLevel)¶
This method draws an area on the GeoCanvas.
public void DrawArea(AreaBaseShape shape, GeoPen outlinePen, GeoBrush fillBrush, DrawingLevel drawingLevel)
Parameters¶
shape
AreaBaseShape
This parameter is the area shape to be drawn.
outlinePen
GeoPen
This parameter describes the outline pen that will be used to draw the AreaShape.
fillBrush
GeoBrush
This parameter describes the fill Brush that will be used to draw the
AreaShape.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen will draw on.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the areaShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the areaShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the outlinePen, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw on the GeoCanvas. It provides you with a number of overloads that allow you to control how things are drawn. Specify the GeoBrush to fill in an area. Specify the GeoPen to outline an area using that GeoPen. You can also call an overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when you are drawing multiple areas. This is very useful when you want to draw a drop shadow, for example. In that case, you could draw the black backdrop on the lowest level with an offset, then draw the normal shape on a higher level without an offset.
DrawArea(Feature, GeoPen, GeoBrush, DrawingLevel, Single, Single, PenBrushDrawingOrder)¶
This method draws an area on the GeoCanvas.
public void DrawArea(Feature feature, GeoPen outlinePen, GeoBrush fillBrush, DrawingLevel drawingLevel, float xOffset, float yOffset, PenBrushDrawingOrder penBrushDrawingOrder)
Parameters¶
feature
Feature
This parameter is the AreaFeature to be drawn.
outlinePen
GeoPen
This parameter describes the outline GeoPen that will be used to draw the
AreaShape.
fillBrush
GeoBrush
This parameter describes the fill GeoBrush that will be used to draw the
AreaShape.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen will draw on.
xOffset
Single
This parameter determines the X offset for the feature that will be drawn.
yOffset
Single
This parameter determines the Y offset for the feature that will be drawn.
penBrushDrawingOrder
PenBrushDrawingOrder
This parameter determines the PenBrushingDrawingOrder used when drawing the area type feature.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the areaShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the areaShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the outlinePen, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw on the GeoCanvas. It provides you with a number of overloads that allow you to control how things are drawn. Specify the GeoBrush to fill in an area. Specify the GeoPen to outline an area using that GeoPen. You can also call an overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when you are drawing multiple areas. This is very useful when you want to draw a drop shadow, for example. In that case, you could draw the black backdrop on the lowest level with an offset, then draw the normal shape on a higher level without an offset.
DrawArea(AreaBaseShape, GeoPen, GeoBrush, DrawingLevel, Single, Single, PenBrushDrawingOrder)¶
This method draws an area on the GeoCanvas.
public void DrawArea(AreaBaseShape shape, GeoPen outlinePen, GeoBrush fillBrush, DrawingLevel drawingLevel, float xOffset, float yOffset, PenBrushDrawingOrder penBrushDrawingOrder)
Parameters¶
shape
AreaBaseShape
This parameter is the area shape to be drawn.
outlinePen
GeoPen
This parameter describes the outline GeoPen that will be used to draw the
AreaShape.
fillBrush
GeoBrush
This parameter describes the fill GeoBrush that will be used to draw the
AreaShape.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen will draw on.
xOffset
Single
This parameter determines the X offset for the feature to be drawn.
yOffset
Single
This parameter determines the Y offset for the feature to be drawn.
penBrushDrawingOrder
PenBrushDrawingOrder
This parameter determines the PenBrushDrawingOrder used when drawing the area type feature.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the areaShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the areaShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the outlinePen, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw on the GeoCanvas. It provides you with a number of overloads that allow you to control how things are drawn. Specify the GeoBrush to fill in an area. Specify the GeoPen to outline an area using that GeoPen. You can also call an overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when you are drawing multiple areas. This is very useful when you want to draw a drop shadow, for example. In that case, you could draw the black backdrop on the lowest level with an offset, then draw the normal shape on a higher level without an offset.
DrawArea(IEnumerable<ScreenPointF[]>, GeoPen, GeoBrush, DrawingLevel, Single, Single, PenBrushDrawingOrder)¶
This method draws an area on the GeoCanvas.
public void DrawArea(IEnumerable<ScreenPointF[]> screenPoints, GeoPen outlinePen, GeoBrush fillBrush, DrawingLevel drawingLevel, float xOffset, float yOffset, PenBrushDrawingOrder penBrushDrawingOrder)
Parameters¶
screenPoints
IEnumerable<ScreenPointF[]>
This parameter is the AreaShape in well-known binary format.
outlinePen
GeoPen
This parameter describes the outline GeoPen that will be used to draw the
AreaShape.
fillBrush
GeoBrush
This parameter describes the fill GeoBrush that will be used to draw the
AreaShape.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen will draw on.
xOffset
Single
This parameter determines the X offset for the feature to be drawn.
yOffset
Single
This parameter determines the Y offset for the feature to be drawn.
penBrushDrawingOrder
PenBrushDrawingOrder
This parameter determines the PenBrushDrawingOrder used when drawing the area type feature.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the areaShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the areaShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the outlinePen, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw on the GeoCanvas. It provides you with a number of overloads that allow you to control how things are drawn. Specify the GeoBrush to fill in an area. Specify the GeoPen to outline an area using that GeoPen. You can also call an overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when you are drawing multiple areas. This is very useful when you want to draw a drop shadow, for example. In that case, you could draw the black backdrop on the lowest level with an offset, then draw the normal shape on a higher level without an offset.
DrawAreaCore(IEnumerable<ScreenPointF[]>, GeoPen, GeoBrush, DrawingLevel, Single, Single, PenBrushDrawingOrder)¶
This method draws an area on the GeoCanvas.
protected abstract void DrawAreaCore(IEnumerable<ScreenPointF[]> screenPoints, GeoPen outlinePen, GeoBrush fillBrush, DrawingLevel drawingLevel, float xOffset, float yOffset, PenBrushDrawingOrder penBrushDrawingOrder)
Parameters¶
screenPoints
IEnumerable<ScreenPointF[]>
This parameter is the AreaShape in well-known binary format.
outlinePen
GeoPen
This parameter describes the outline GeoPen that will be used to draw the
AreaShape.
fillBrush
GeoBrush
This parameter describes the fill GeoBrush that will be used to draw the
AreaShape.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen will draw on.
xOffset
Single
This parameter determines the X offset for the feature to be drawn.
yOffset
Single
This parameter determines the Y offset for the feature to be drawn.
penBrushDrawingOrder
PenBrushDrawingOrder
This parameter determines the PenBrushDrawingOrder used when drawing the area type feature.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the areaShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the areaShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the outlinePen, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw on the GeoCanvas. It provides you with a number of overloads that allow you to control how things are drawn. Specify the GeoBrush to fill in an area. Specify the GeoPen to outline an area using that GeoPen. You can also call an overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when you are drawing multiple areas. This is very useful when you want to draw a drop shadow, for example. In that case, you could draw the black backdrop on the lowest level with an offset, then draw the normal shape on a higher level without an offset.
DrawLine(Feature, GeoPen, DrawingLevel)¶
Draws a line on the GeoCanvas.
public void DrawLine(Feature feature, GeoPen linePen, DrawingLevel drawingLevel)
Parameters¶
feature
Feature
This parameter is the line feature.
linePen
GeoPen
This parameter describes the GeoPen that will be used to draw the line.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen will draw on.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the lineShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the lineShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the linePen, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw a line on the GeoCanvas using the specified GeoPen.
The DrawingLevel allows you to specify the level you will draw on when drawing multiple lines. This is very useful when you want to draw a road, for example. You can draw the black background on the lowest level, then draw a slightly thinner white line on a higher level. This will result in a great effect for a road.
DrawLine(LineBaseShape, GeoPen, DrawingLevel)¶
Draws a line on the GeoCanvas.
public void DrawLine(LineBaseShape shape, GeoPen linePen, DrawingLevel drawingLevel)
Parameters¶
shape
LineBaseShape
This parameter is the line shape to be drawn by GeoCannvas.
linePen
GeoPen
This parameter describes the GeoPen that will be used to draw the line.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen will draw on.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the lineShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the lineShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the linePen, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw a line on the GeoCanvas using the specified GeoPen.
The DrawingLevel allows you to specify the level you will draw on when drawing multiple lines. This is very useful when you want to draw a road, for example. You can draw the black background on the lowest level, then draw a slightly thinner white line on a higher level. This will result in a great effect for a road.
DrawLine(Feature, GeoPen, DrawingLevel, Single, Single)¶
Draws a line on the GeoCanvas.
public void DrawLine(Feature feature, GeoPen linePen, DrawingLevel drawingLevel, float xOffset, float yOffset)
Parameters¶
feature
Feature
This parameter is the line feature to be drawn by GeoCannvas.
linePen
GeoPen
This parameter describes the GeoPen that will be used to draw the line.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen will draw on.
xOffset
Single
This parameter determines the X offset for the feature to be drawn.
yOffset
Single
This parameter determines the Y offset for the feature to be drawn.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the lineShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the lineShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the linePen, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw a line on the GeoCanvas using the specified GeoPen.
The DrawingLevel allows you to specify the level you will draw on when drawing multiple lines. This is very useful when you want to draw a road, for example. You can draw the black background on the lowest level, then draw a slightly thinner white line on a higher level. This will result in a great effect for a road.
DrawLine(LineBaseShape, GeoPen, DrawingLevel, Single, Single)¶
Draws a line on the GeoCanvas.
public void DrawLine(LineBaseShape shape, GeoPen linePen, DrawingLevel drawingLevel, float xOffset, float yOffset)
Parameters¶
shape
LineBaseShape
This parameter is the line shape to be drawn by GeoCannvas.
linePen
GeoPen
This parameter describes the GeoPen that will be used to draw the line.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen will draw on.
xOffset
Single
This parameter determines the X offset for the feature to be drawn.
yOffset
Single
This parameter determines the Y offset for the feature to be drawn.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the lineShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the lineShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the linePen, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw a line on the GeoCanvas using the specified GeoPen.
The DrawingLevel allows you to specify the level you will draw on when drawing multiple lines. This is very useful when you want to draw a road, for example. You can draw the black background on the lowest level, then draw a slightly thinner white line on a higher level. This will result in a great effect for a road.
DrawLine(IEnumerable<ScreenPointF>, GeoPen, DrawingLevel, Single, Single)¶
Draws the LineShape on the GeoCanvas.
public void DrawLine(IEnumerable<ScreenPointF> screenPoints, GeoPen linePen, DrawingLevel drawingLevel, float xOffset, float yOffset)
Parameters¶
screenPoints
IEnumerable<ScreenPointF>
This parameter is the LineShape in well-known binary format.
linePen
GeoPen
This parameter describes the GeoPen that will be used to draw the
LineShape.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen will draw on.
xOffset
Single
This parameter determines the X offset for the feature to be drawn.
yOffset
Single
This parameter determines the Y offset for the feature to be drawn.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the lineShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the lineShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the linePen, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw a line on the GeoCanvas using the specified GeoPen.
The DrawingLevel allows you to specify the level you will draw on when drawing multiple lines. This is very useful when you want to draw a road, for example. You can draw the black background on the lowest level, then draw a slightly thinner white line on a higher level. This will result in a great effect for a road.
DrawLineCore(IEnumerable<ScreenPointF>, GeoPen, DrawingLevel, Single, Single)¶
Draws the LineShape on the GeoCanvas.
protected abstract void DrawLineCore(IEnumerable<ScreenPointF> screenPoints, GeoPen linePen, DrawingLevel drawingLevel, float xOffset, float yOffset)
Parameters¶
screenPoints
IEnumerable<ScreenPointF>
This parameter is the LineShape in well-known binary format.
linePen
GeoPen
This parameter describes the GeoPen that will be used to draw the
LineShape.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen will draw on.
xOffset
Single
This parameter determines the X offset for the feature to be drawn.
yOffset
Single
This parameter determines the Y offset for the feature to be drawn.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the lineShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the lineShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the linePen, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw a line on the GeoCanvas using the specified GeoPen.
The DrawingLevel allows you to specify the level you will draw on when drawing multiple lines. This is very useful when you want to draw a road, for example. You can draw the black background on the lowest level, then draw a slightly thinner white line on a higher level. This will result in a great effect for a road.
DrawEllipse(Feature, Single, Single, GeoPen, DrawingLevel)¶
Draws a point on the GeoCanvas.
public void DrawEllipse(Feature feature, float width, float height, GeoPen outlinePen, DrawingLevel drawingLevel)
Parameters¶
feature
Feature
This parameter is the center point feature.
width
Single
This parameter describes the width of the ellipse to be drawn.
height
Single
This parameter describes the height of the ellipse to be drawn.
outlinePen
GeoPen
This parameter describes the outline GeoPen that will be used to draw the
point.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen will draw on.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the pointShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the pointShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the outlinePen, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw a point on the GeoCanvas. It provides you with a number of overloads that allow you to control how it is drawn. Specify the GeoBrush to fill in the area of the point. Specify the GeoPen to outline the point using that GeoPen. You can also call a overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when drawing many points.
DrawEllipse(PointBaseShape, Single, Single, GeoPen, DrawingLevel)¶
Draws a point on the GeoCanvas.
public void DrawEllipse(PointBaseShape shape, float width, float height, GeoPen outlinePen, DrawingLevel drawingLevel)
Parameters¶
shape
PointBaseShape
This parameter is the center point shape.
width
Single
This parameter describes the width of the ellipse to be drawn.
height
Single
This parameter describes the height of the ellipse to be drawn.
outlinePen
GeoPen
This parameter describes the outline GeoPen that will be used to draw the
point.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen will draw on.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the pointShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the pointShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the outlinePen, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw a point on the GeoCanvas. It provides you with a number of overloads that allow you to control how it is drawn. Specify the GeoBrush to fill in the area of the point. Specify the GeoPen to outline the point using that GeoPen. You can also call a overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when drawing many points.
DrawEllipse(Feature, Single, Single, GeoBrush, DrawingLevel)¶
Draws a point on the GeoCanvas.
public void DrawEllipse(Feature centerPointFeature, float width, float height, GeoBrush fillBrush, DrawingLevel drawingLevel)
Parameters¶
centerPointFeature
Feature
This parameter is the center point feature.
width
Single
This parameter describes the width of the ellipse to be drawn.
height
Single
This parameter describes the height of the ellipse to be drawn.
fillBrush
GeoBrush
This parameter describes the fill GeoBrush that will be used to draw the
point.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel the the GeoBrush will draw on.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the pointShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the pointShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw a point on the GeoCanvas. It provides you with a number of overloads that allow you to control how it is drawn. Specify the GeoBrush to fill in the area of the point. Specify the GeoPen to outline the point using that GeoPen. You can also call a overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when drawing many points.
DrawEllipse(PointBaseShape, Single, Single, GeoBrush, DrawingLevel)¶
Draws a point on the GeoCanvas.
public void DrawEllipse(PointBaseShape shape, float width, float height, GeoBrush fillBrush, DrawingLevel drawingLevel)
Parameters¶
shape
PointBaseShape
This parameter is the center point shape.
width
Single
This parameter describes the width of the ellipse to be drawn.
height
Single
This parameter describes the height of the ellipse to be drawn.
fillBrush
GeoBrush
This parameter describes the fill GeoBrush that will be used to draw the
point.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel the the GeoBrush will draw on.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the pointShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the pointShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw a point on the GeoCanvas. It provides you with a number of overloads that allow you to control how it is drawn. Specify the GeoBrush to fill in the area of the point. Specify the GeoPen to outline the point using that GeoPen. You can also call a overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when drawing many points.
DrawEllipse(Feature, Single, Single, GeoPen, GeoBrush, DrawingLevel)¶
Draws a point on the GeoCanvas.
public void DrawEllipse(Feature feature, float width, float height, GeoPen outlinePen, GeoBrush fillBrush, DrawingLevel drawingLevel)
Parameters¶
feature
Feature
This parameter is the center point feature.
width
Single
This parameter describes the width of the ellipse to be drawn.
height
Single
This parameter describes the height of the ellipse to be drawn.
outlinePen
GeoPen
This parameter describes the outline GeoPen that will be used to draw the
point.
fillBrush
GeoBrush
This parameter describes the fill GeoBrush that will be used to draw the
point.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen or GeoBrush will draw
on.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the pointShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the pointShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the outlinePen and a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw a point on the GeoCanvas. It provides you with a number of overloads that allow you to control how it is drawn. Specify the GeoBrush to fill in the area of the point. Specify the GeoPen to outline the point using that GeoPen. You can also call a overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when drawing many points.
DrawEllipse(PointBaseShape, Single, Single, GeoPen, GeoBrush, DrawingLevel)¶
Draws a point on the GeoCanvas.
public void DrawEllipse(PointBaseShape shape, float width, float height, GeoPen outlinePen, GeoBrush fillBrush, DrawingLevel drawingLevel)
Parameters¶
shape
PointBaseShape
This parameter is the center point shape.
width
Single
This parameter describes the width of the ellipse to be drawn.
height
Single
This parameter describes the height of the ellipse to be drawn.
outlinePen
GeoPen
This parameter describes the outline GeoPen that will be used to draw the
point.
fillBrush
GeoBrush
This parameter describes the fill GeoBrush that will be used to draw the
point.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen or GeoBrush will draw
on.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the pointShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the pointShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw a point on the GeoCanvas. It provides you with a number of overloads that allow you to control how it is drawn. Specify the GeoBrush to fill in the area of the point. Specify the GeoPen to outline the point using that GeoPen. You can also call a overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when drawing many points.
DrawEllipse(Feature, Single, Single, GeoPen, GeoBrush, DrawingLevel, Single, Single, PenBrushDrawingOrder)¶
Draws a point on the GeoCanvas.
public void DrawEllipse(Feature feature, float width, float height, GeoPen outlinePen, GeoBrush fillBrush, DrawingLevel drawingLevel, float xOffset, float yOffset, PenBrushDrawingOrder penBrushDrawingOrder)
Parameters¶
feature
Feature
This parameter is the center point feature.
width
Single
This parameter describes the width of the ellipse to be drawn.
height
Single
This parameter describes the height of the ellipse to be drawn.
outlinePen
GeoPen
This parameter describes the outline GeoPen that will be used to draw the
point.
fillBrush
GeoBrush
This parameter describes the fill GeoBrush that will be used to draw the
point.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen or GeoBrush will draw
on.
xOffset
Single
This parameter determines the X offset for the ellipse to be drawn.
yOffset
Single
This parameter determines the Y offset for the ellipse to be drawn.
penBrushDrawingOrder
PenBrushDrawingOrder
This parameter determines the PenBrushDrawingOrder used when drawing the ellipse.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the pointShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the pointShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw a point on the GeoCanvas. It provides you with a number of overloads that allow you to control how it is drawn. Specify the GeoBrush to fill in the area of the point. Specify the GeoPen to outline the point using that GeoPen. You can also call a overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when drawing many points.
DrawEllipse(PointBaseShape, Single, Single, GeoPen, GeoBrush, DrawingLevel, Single, Single, PenBrushDrawingOrder)¶
Draws a point on the GeoCanvas.
public void DrawEllipse(PointBaseShape shape, float width, float height, GeoPen outlinePen, GeoBrush fillBrush, DrawingLevel drawingLevel, float xOffset, float yOffset, PenBrushDrawingOrder penBrushDrawingOrder)
Parameters¶
shape
PointBaseShape
This parameter is the center point shape.
width
Single
This parameter describes the width of the ellipse to be drawn.
height
Single
This parameter describes the height of the ellipse to be drawn.
outlinePen
GeoPen
This parameter describes the outline GeoPen that will be used to draw the
point.
fillBrush
GeoBrush
This parameter describes the fill GeoBrush that will be used to draw the
point.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen or GeoBrush will draw
on.
xOffset
Single
This parameter determines the X offset for the ellipse to be drawn.
yOffset
Single
This parameter determines the Y offset for the ellipse to be drawn.
penBrushDrawingOrder
PenBrushDrawingOrder
This parameter determines the PenBrushDrawingOrder used when drawing the ellipse.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the pointShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the pointShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw a point on the GeoCanvas. It provides you with a number of overloads that allow you to control how it is drawn. Specify the GeoBrush to fill in the area of the point. Specify the GeoPen to outline the point using that GeoPen. You can also call a overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when drawing many points.
DrawEllipse(ScreenPointF, Single, Single, GeoPen, GeoBrush, DrawingLevel, Single, Single, PenBrushDrawingOrder)¶
Draws a point on the GeoCanvas.
public void DrawEllipse(ScreenPointF screenPoint, float width, float height, GeoPen outlinePen, GeoBrush fillBrush, DrawingLevel drawingLevel, float xOffset, float yOffset, PenBrushDrawingOrder penBrushDrawingOrder)
Parameters¶
screenPoint
ScreenPointF
This parameter is the center point in screen coordinate.
width
Single
This parameter describes the width of the ellipse to be drawn.
height
Single
This parameter describes the height of the ellipse to be drawn.
outlinePen
GeoPen
This parameter describes the outline GeoPen that will be used to draw the
point.
fillBrush
GeoBrush
This parameter describes the fill GeoBrush that will be used to draw the
point.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen or GeoBrush will draw
on.
xOffset
Single
This parameter determines the X offset for the ellipse to be drawn.
yOffset
Single
This parameter determines the Y offset for the ellipse to be drawn.
penBrushDrawingOrder
PenBrushDrawingOrder
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the pointShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the pointShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw a point on the GeoCanvas. It provides you with a number of overloads that allow you to control how it is drawn. Specify the GeoBrush to fill in the area of the point. Specify the GeoPen to outline the point using that GeoPen. You can also call a overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when drawing many points.
DrawEllipseCore(ScreenPointF, Single, Single, GeoPen, GeoBrush, DrawingLevel, Single, Single, PenBrushDrawingOrder)¶
Draws a point on the GeoCanvas.
protected abstract void DrawEllipseCore(ScreenPointF screenPoint, float width, float height, GeoPen outlinePen, GeoBrush fillBrush, DrawingLevel drawingLevel, float xOffset, float yOffset, PenBrushDrawingOrder penBrushDrawingOrder)
Parameters¶
screenPoint
ScreenPointF
This parameter is the center point in well-known binary format.
width
Single
This parameter describes the width of the ellipse to be drawn.
height
Single
This parameter describes the height of the ellipse to be drawn.
outlinePen
GeoPen
This parameter describes the outline GeoPen that will be used to draw the
point.
fillBrush
GeoBrush
This parameter describes the fill GeoBrush that will be used to draw the
point.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel that the GeoPen or GeoBrush will draw
on.
xOffset
Single
This parameter determines the X offset for the screenPoint to be drawn.
yOffset
Single
This parameter determines the Y offset for the screenPoint to be drawn.
penBrushDrawingOrder
PenBrushDrawingOrder
This parameter determines the PenBrushDrawingOrder used when drawing the ellipse.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentException
Passing invalid well-known binary in the pointShapeWkb parameter will throw an ArgumentException.
ArgumentNullException
If you pass a null as the pointShapeWkb, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the outlinePen and a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
Remarks:
This method is used to draw a point on the GeoCanvas. It provides you with a number of overloads that allow you to control how it is drawn. Specify the GeoBrush to fill in the area of the point. Specify the GeoPen to outline the point using that GeoPen. You can also call a overload that will allow you to specify both a GeoPen and a GeoBrush.
The DrawingLevel allows you to specify the level you will draw on when drawing many points.
DrawWorldImageWithoutScaling(GeoImage, Double, Double, DrawingLevel)¶
Draws an unscaled image on the GeoCanvas.
public void DrawWorldImageWithoutScaling(GeoImage image, double centerXInWorld, double centerYInWorld, DrawingLevel drawingLevel)
Parameters¶
image
GeoImage
The image you want to draw unscaled.
centerXInWorld
Double
The X coordinate of the center point of where you want to draw the image.
centerYInWorld
Double
The Y coordinate of the center point of where you want to draw the image.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel the image will draw on.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentNullException
If you pass a null as the image, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
ArgumentException
Passing an invalid image parameter will throw an ArgumentException.
Remarks:
Drawing an image unscaled is faster than using the API that scales it.
The X & Y in work coordinates is where the center of the image will be drawn.
DrawWorldImageWithoutScaling(GeoImage, Double, Double, DrawingLevel, Single, Single, Single)¶
Draws an unscaled image on the GeoCanvas.
public void DrawWorldImageWithoutScaling(GeoImage image, double centerXInWorld, double centerYInWorld, DrawingLevel drawingLevel, float xOffset, float yOffset, float rotateAngle)
Parameters¶
image
GeoImage
The image you want to draw unscaled.
centerXInWorld
Double
The X coordinate of the center point (in world coordinates) of where you want to draw the image.
centerYInWorld
Double
The Y coordinate of the center point (in world coordinates) of where you want to draw the image.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel the image will draw on.
xOffset
Single
This parameter determines the X offset for the image to be drawn.
yOffset
Single
This parameter determines the Y offset for the image to be drawn.
rotateAngle
Single
This parameter determines the rotation angle for the image to be drawn.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentNullException
If you pass a null as the image, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
ArgumentException
Passing an invalid image parameter will throw an ArgumentException.
Remarks:
Drawing an image unscaled is faster than using the API that scales it.
The X & Y in work coordinates is where the center of the image will be drawn.
DrawScreenImageWithoutScaling(GeoImage, Single, Single, DrawingLevel, Single, Single, Single)¶
Draws an unscaled image on the GeoCanvas.
public void DrawScreenImageWithoutScaling(GeoImage image, float centerXInScreen, float centerYInScreen, DrawingLevel drawingLevel, float xOffset, float yOffset, float rotateAngle)
Parameters¶
image
GeoImage
The image you want to draw unscaled.
centerXInScreen
Single
The X coordinate of the center point (in screen coordinates) of where you want to draw the image.
centerYInScreen
Single
The Y coordinate of the center point (in screen coordinates) of where you want to draw the image.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel the image will draw on.
xOffset
Single
This parameter determines the X offset for the image to be drawn.
yOffset
Single
This parameter determines the Y offset for the image to be drawn.
rotateAngle
Single
This parameter determines the rotation angle for the image to be drawn.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentNullException
If you pass a null as the image, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
ArgumentException
Passing an invalid image parameter will throw an ArgumentException.
Remarks:
Drawing an image unscaled is faster than using the API that scales it.
The X & Y in work coordinates is where the center of the image will be drawn.
DrawScreenImageWithoutScalingCore(GeoImage, Single, Single, DrawingLevel, Single, Single, Single)¶
Draws an unscaled image on the GeoCanvas.
protected abstract void DrawScreenImageWithoutScalingCore(GeoImage image, float centerXInScreen, float centerYInScreen, DrawingLevel drawingLevel, float xOffset, float yOffset, float rotateAngle)
Parameters¶
image
GeoImage
The image you want to draw unscaled.
centerXInScreen
Single
The X coordinate of the center point (in screen coordinates) of where you want to draw the image.
centerYInScreen
Single
The Y coordinate of the center point (in screen coordinates) of where you want to draw the image.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel the image will draw on.
xOffset
Single
This parameter determines the X offset for the image to be drawn.
yOffset
Single
This parameter determines the Y offset for the image to be drawn.
rotateAngle
Single
This parameter determines the rotation angle for the image to be drawn.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentNullException
If you pass a null as the image, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
ArgumentException
Passing an invalid image parameter will throw an ArgumentException.
Remarks:
Drawing an image unscaled is faster than using the API that scales it.
DrawWorldImage(GeoImage, Double, Double, Single, Single, DrawingLevel)¶
Draws a scaled image on the GeoCanvas.
public void DrawWorldImage(GeoImage image, double centerXInWorld, double centerYInWorld, float widthInScreen, float heightInScreen, DrawingLevel drawingLevel)
Parameters¶
image
GeoImage
The image you want to draw.
centerXInWorld
Double
The X coordinate of the center point of where you want to draw the image.
centerYInWorld
Double
The Y coordinate of the center point of where you want to draw the image.
widthInScreen
Single
The width you want to scale the image to. This is the width of the image that will be
drawn.
heightInScreen
Single
The height you want to scale the image to. This is the height of the image that will be
drawn.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel the image will draw on.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentNullException
If you pass a null as the image, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
ArgumentOutOfRangeException
If you pass in a widthInScreen that is not greater than 0, it will throw a ArgumentOutOfRangeException.
ArgumentOutOfRangeException
If you pass in a heightInScreen that is not greater than 0, it will throw a ArgumentOutOfRangeException.
Remarks:
Drawing an image scaled is slower than using the API that draws it unscaled.
DrawWorldImage(GeoImage, Double, Double, Double, DrawingLevel, Single, Single, Single)¶
Draws a world image on the GeoCanvas.
public void DrawWorldImage(GeoImage image, double centerXInWorld, double centerYInWorld, double imageScale, DrawingLevel drawingLevel, float xOffset, float yOffset, float rotateAngle)
Parameters¶
image
GeoImage
The image you want to draw.
centerXInWorld
Double
The X coordinate of the center point of where you want to draw the image.
centerYInWorld
Double
The Y coordinate of the center point of where you want to draw the image.
imageScale
Double
The scale at which you want to draw the image. The final width and height will be caculated based on the scale.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel the image will draw on.
xOffset
Single
This parameter determines the X offset for the image to be drawn.
yOffset
Single
This parameter determines the Y offset for the image to be drawn.
rotateAngle
Single
This parameter determines the rotation angle for the image to be drawn.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentNullException
If you pass a null as the image, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
ArgumentOutOfRangeException
If you pass in a widthInScreen that is not greater than 0, it will throw a ArgumentOutOfRangeException.
ArgumentOutOfRangeException
If you pass in a heightInScreen that is not greater than 0, it will throw a ArgumentOutOfRangeException.
Remarks:
Drawing an image scaled is slower than using the API that draws it unscaled.
DrawWorldImage(GeoImage, Double, Double, Single, Single, DrawingLevel, Single, Single, Single)¶
Draws a world image on the GeoCanvas.
public void DrawWorldImage(GeoImage image, double centerXInWorld, double centerYInWorld, float widthInScreen, float heightInScreen, DrawingLevel drawingLevel, float xOffset, float yOffset, float rotateAngle)
Parameters¶
image
GeoImage
The image you want to draw.
centerXInWorld
Double
The X coordinate of the center point of where you want to draw the image.
centerYInWorld
Double
The Y coordinate of the center point of where you want to draw the image.
widthInScreen
Single
The width you want to scale the image to. This is the width of the image that will be drawn.
heightInScreen
Single
The height you want to scale the image to. This is the height of the image that will be drawn.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel the image will draw on.
xOffset
Single
This parameter determines the X offset for the image to be drawn.
yOffset
Single
This parameter determines the Y offset for the image to be drawn.
rotateAngle
Single
This parameter determines the rotation angle for the image to be drawn.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentNullException
If you pass a null as the image, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
ArgumentOutOfRangeException
If you pass in a widthInScreen that is not greater than 0, it will throw a ArgumentOutOfRangeException.
ArgumentOutOfRangeException
If you pass in a heightInScreen that is not greater than 0, it will throw a ArgumentOutOfRangeException.
Remarks:
Drawing an image scaled is slower than using the API that draws it unscaled.
DrawScreenImage(GeoImage, Single, Single, Single, Single, DrawingLevel, Single, Single, Single)¶
Draws a screen image on the GeoCanvas.
public void DrawScreenImage(GeoImage image, float centerXInScreen, float centerYInScreen, float widthInScreen, float heightInScreen, DrawingLevel drawingLevel, float xOffset, float yOffset, float rotateAngle)
Parameters¶
image
GeoImage
The image you want to draw.
centerXInScreen
Single
The X coordinate of the center point (in screen coordinates) of where you want to draw the image.
centerYInScreen
Single
The Y coordinate of the center point (in screen coordinates) of where you want to draw the image.
widthInScreen
Single
The width you want to scale the image to. This is the width of the image that will be
drawn.
heightInScreen
Single
The height you want to scale the image to. This is the height of the image that will be
drawn.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel the image will draw on.
xOffset
Single
This parameter determines the X offset for the image to be drawn.
yOffset
Single
This parameter determines the Y offset for the image to be drawn.
rotateAngle
Single
This parameter determines the rotation angle for the image to be drawn.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentNullException
If you pass a null as the image, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
ArgumentOutOfRangeException
If you pass in a widthInScreen that is not greater than 0, it will throw a ArgumentOutOfRangeException.
ArgumentOutOfRangeException
If you pass in a heightInScreen that is not greater than 0, it will throw a ArgumentOutOfRangeException.
Remarks:
Drawing an image scaled is slower than using the API that draws it unscaled.
DrawScreenImageCore(GeoImage, Single, Single, Single, Single, DrawingLevel, Single, Single, Single)¶
Draws a scaled image on the GeoCanvas.
protected abstract void DrawScreenImageCore(GeoImage image, float centerXInScreen, float centerYInScreen, float widthInScreen, float heightInScreen, DrawingLevel drawingLevel, float xOffset, float yOffset, float rotateAngle)
Parameters¶
image
GeoImage
The image you want to draw.
centerXInScreen
Single
The X coordinate of the center point (in screen coordinates) of where you want to draw the image.
centerYInScreen
Single
The Y coordinate of the center point (in screen coordinates) of where you want to draw the image.
widthInScreen
Single
The width you want to scale the image to. This is the width of the image that will be
drawn.
heightInScreen
Single
The height you want to scale the image to. This is the height of the image that will be
drawn.
drawingLevel
DrawingLevel
This parameter determines the DrawingLevel the image will draw on.
xOffset
Single
This parameter determines the X offset for the image to be drawn.
yOffset
Single
This parameter determines the Y offset for the image to be drawn.
rotateAngle
Single
This parameter determines the rotation angle for the image to be drawn.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentNullException
If you pass a null as the image, we will throw an ArgumentNullException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
ArgumentOutOfRangeException
If you pass in a widthInScreen that is not greater than 0, it will throw a ArgumentOutOfRangeException.
ArgumentOutOfRangeException
If you pass in a heightInScreen that is not greater than 0, it will throw a ArgumentOutOfRangeException.
Remarks:
Drawing an image scaled is slower than using the API that draws it unscaled.
DrawTextWithScreenCoordinate(String, GeoFont, GeoBrush, Single, Single, DrawingLevel)¶
This method allows you to draw text at the specified location, using the specified brush and font parameters.
public void DrawTextWithScreenCoordinate(string text, GeoFont font, GeoBrush fillBrush, float upperLeftXInScreen, float upperLeftYInScreen, DrawingLevel drawingLevel)
Parameters¶
text
String
This parameter specifies the text you wish to draw.
font
GeoFont
This parameter represents the font you wish to use to draw the text.
fillBrush
GeoBrush
This parameter specifies the kind of fill you want to use to draw the
text.
upperLeftXInScreen
Single
This parameter is the upper left horizontal point in screen coordinates of where
you want to start drawing the text from.
upperLeftYInScreen
Single
This parameter is the upper left vertical point in screen coordinates of where
you want to start drawing the text from.
drawingLevel
DrawingLevel
This parameter specifies the drawing level you wish to draw the text on. Higher
levels overwrite lower levels.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the text, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the font, we will throw an ArgumentNullException.
ArgumentException
If you pass a blank string in the text parameter, we will throw an ArgumentException.
Remarks:
This method is used to draw text on the GeoCanvas at specific screen coordinates. It provides you with a number of overloads that allow you to control how the text is drawn. This is useful especially when adding things such as legends, titles, etc.
The DrawingLevel allows you to specify the level you will draw on when drawing multiple text items. This is very useful when you want to draw a drop shadow, for example. You can draw the black backdrop on the lowest level with an offset, then draw the normal text on a higher level without an offset.
DrawTextWithScreenCoordinate(String, GeoFont, GeoBrush, GeoPen, Single, Single, DrawingLevel)¶
Draws the text with screen coordinate.
public void DrawTextWithScreenCoordinate(string text, GeoFont font, GeoBrush fillBrush, GeoPen haloPen, float upperLeftXInScreen, float upperLeftYInScreen, DrawingLevel drawingLevel)
Parameters¶
text
String
The text.
font
GeoFont
The font.
fillBrush
GeoBrush
The fill brush.
haloPen
GeoPen
The halo pen.
upperLeftXInScreen
Single
The upper left x in screen.
upperLeftYInScreen
Single
The upper left y in screen.
drawingLevel
DrawingLevel
The drawing level.
DrawTextWithWorldCoordinate(String, GeoFont, GeoBrush, Double, Double, DrawingLevel, DrawingTextAlignment)¶
This method allows you to draw text at the specified location, using the specified brush and font parameters.
public void DrawTextWithWorldCoordinate(string text, GeoFont font, GeoBrush fillBrush, double upperLeftXInWorld, double upperLeftYInWorld, DrawingLevel drawingLevel, DrawingTextAlignment drawingTextAlignment)
Parameters¶
text
String
This parameter specifies the text you wish to draw.
font
GeoFont
This parameter represents the font you wish to use to draw the text.
fillBrush
GeoBrush
This parameter specifies the kind of fill you want to use to draw the
text.
upperLeftXInWorld
Double
This parameter is the upper left horizontal point in world coordinates of where
you want to start drawing the text from.
upperLeftYInWorld
Double
This parameter is the upper left horizontal point in world coordinates of where
you want to start drawing the text from.
drawingLevel
DrawingLevel
This parameter specifies the drawing level you wish to draw the text on. Higher
levels overwrite lower levels.
drawingTextAlignment
DrawingTextAlignment
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the text, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the font, we will throw an ArgumentNullException.
ArgumentException
If you pass a blank string in the text parameter, we will throw an ArgumentException.
Remarks:
This method is used to draw text on the GeoCanvas at specific screen coordinates. It provides you with a number of overloads that allow you to control how the text is drawn. This is useful especially when adding things such as legends, titles, etc.
The DrawingLevel allows you to specify the level you will draw on when drawing multiple text items. This is very useful when you want to draw a drop shadow, for example. You can draw the black backdrop on the lowest level with an offset, then draw the normal text on a higher level without an offset.
DrawTextWithWorldCoordinate(String, GeoFont, GeoBrush, GeoPen, Double, Double, DrawingLevel, DrawingTextAlignment)¶
Draws the text with world coordinate.
public void DrawTextWithWorldCoordinate(string text, GeoFont font, GeoBrush fillBrush, GeoPen haloPen, double upperLeftXInWorld, double upperLeftYInWorld, DrawingLevel drawingLevel, DrawingTextAlignment drawingTextAlignment)
Parameters¶
text
String
The text.
font
GeoFont
The font.
fillBrush
GeoBrush
The fill brush.
haloPen
GeoPen
The halo pen.
upperLeftXInWorld
Double
The upper left x in world.
upperLeftYInWorld
Double
The upper left y in world.
drawingLevel
DrawingLevel
The drawing level.
drawingTextAlignment
DrawingTextAlignment
DrawText(String, GeoFont, GeoBrush, IEnumerable<ScreenPointF>, DrawingLevel)¶
This method allows you to draw text at the specified location, using the specified brush and font parameters.
public void DrawText(string text, GeoFont font, GeoBrush fillBrush, IEnumerable<ScreenPointF> textPathInScreen, DrawingLevel drawingLevel)
Parameters¶
text
String
This parameter specifies the text you wish to draw.
font
GeoFont
This parameter represents the font you wish to use to draw the text.
fillBrush
GeoBrush
This parameter specifies the kind of fill you want to use to draw the
text.
textPathInScreen
IEnumerable<ScreenPointF>
This parameter specifies the path on which to draw the text.
drawingLevel
DrawingLevel
This parameter specifies the drawing level you wish to draw the text on. Higher
levels overwrite lower levels.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the text, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the font, we will throw an ArgumentNullException.
ArgumentException
If you pass a blank string in the text parameter, we will throw an ArgumentException.
DrawText(String, GeoFont, GeoBrush, GeoPen, IEnumerable<ScreenPointF>, DrawingLevel, Single, Single, DrawingTextAlignment)¶
Draws the text.
public void DrawText(string text, GeoFont font, GeoBrush fillBrush, GeoPen haloPen, IEnumerable<ScreenPointF> textPathInScreen, DrawingLevel drawingLevel, float xOffset, float yOffset, DrawingTextAlignment drawingTextAlignment)
Parameters¶
text
String
The text.
font
GeoFont
The font.
fillBrush
GeoBrush
The fill brush.
haloPen
GeoPen
The halo pen.
textPathInScreen
IEnumerable<ScreenPointF>
The text path in screen.
drawingLevel
DrawingLevel
The drawing level.
xOffset
Single
The x offset.
yOffset
Single
The y offset.
drawingTextAlignment
DrawingTextAlignment
The drawing text alignment.
DrawText(String, GeoFont, GeoBrush, GeoPen, IEnumerable<ScreenPointF>, DrawingLevel, Single, Single, DrawingTextAlignment, Single)¶
This method allows you to draw text at the specified location, using the specified brush and font parameters.
public void DrawText(string text, GeoFont font, GeoBrush fillBrush, GeoPen haloPen, IEnumerable<ScreenPointF> textPathInScreen, DrawingLevel drawingLevel, float xOffset, float yOffset, DrawingTextAlignment drawingTextAlignment, float rotateAngle)
Parameters¶
text
String
This parameter specifies the text you wish to draw.
font
GeoFont
This parameter represents the font you wish to use to draw the text.
fillBrush
GeoBrush
This parameter specifies the kind of fill you want to use to draw the
text.
haloPen
GeoPen
This parameter specifies the HaloPen that will be used to draw the text, when the HaloPen effect is needed.
textPathInScreen
IEnumerable<ScreenPointF>
This parameter specifies the path on which to draw the text.
drawingLevel
DrawingLevel
This parameter specifies the drawing level you wish to draw the text on. Higher
levels overwrite lower levels.
xOffset
Single
This parameter determines the X offset for the text to be drawn.
yOffset
Single
This parameter determines the Y offset for the text to be drawn.
drawingTextAlignment
DrawingTextAlignment
This parameter determines text alignment for the text to be drawn.
rotateAngle
Single
This parameter determines the rotation angle for the text to be drawn.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the text, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the font, we will throw an ArgumentNullException.
ArgumentException
If you pass a blank string in the text parameter, we will throw an ArgumentException.
DrawTextCore(String, GeoFont, GeoBrush, GeoPen, IEnumerable<ScreenPointF>, DrawingLevel, Single, Single, DrawingTextAlignment, Single)¶
This method allows you to draw text at the specified location, using the specified brush and font parameters.
protected abstract 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
This parameter specifies the text you wish to draw.
font
GeoFont
This parameter represents the font you wish to use to draw the text.
fillBrush
GeoBrush
This parameter specifies the kind of fill you want to use to draw the text.
haloPen
GeoPen
This parameter specifies the HaloPen that will be used to draw the text, when the HaloPen effect is needed.
textPathInScreen
IEnumerable<ScreenPointF>
This parameter specifies the path on which to draw the text.
drawingLevel
DrawingLevel
This parameter specifies the drawing level you wish to draw the text on. Higher
levels overwrite lower levels.
xOffset
Single
This parameter determines the X offset for the text to be drawn.
yOffset
Single
This parameter determines the Y offset for the text to be drawn.
drawingTextAlignment
DrawingTextAlignment
This parameter determines text alignment for the text to be drawn.
rotateAngle
Single
This parameter determines the rotation angle for the text to be drawn.
Exceptions¶
InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
ArgumentOutOfRangeException
If you pass in a drawingLevel that is not defined in the enumeration, it will throw a ArgumentOutOfRangeException.
ArgumentNullException
If you pass a null as the fillBrush, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the text, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the font, we will throw an ArgumentNullException.
ArgumentException
If you pass a blank string in the text parameter, we will throw an ArgumentException.
Remarks:
This method is used to draw text on the GeoCanvas.
The DrawingLevel allows you to specify the level you will draw on when drawing multiple text items. This is very useful when you want to draw a drop shadow, for example. You can draw the black backdrop on the lowest level with an offset, then draw the normal text on a higher level without an offset.
MeasureText(String, GeoFont)¶
This method returns the rectangle that contains the specified text, when that text is drawn with the specified font.
public DrawingRectangleF MeasureText(string text, GeoFont font)
Parameters¶
text
String
This parameter represents the text you want to measure.
font
GeoFont
This parameter represents the font of the text you want to measure.
Returns¶
This method returns the rectangle that contains the specified text, when that text is drawn
with the specified font.
Exceptions¶
ArgumentNullException
If you pass a null as the text, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the font, we will throw an ArgumentNullException.
ArgumentException
If you pass a blank string in the text parameter, we will throw an ArgumentException.
Remarks:
This method is typically used for labeling, to determine whether labels overlap.
MeasureTextCore(String, GeoFont)¶
This method returns the rectangle that contains the specified text, when that text is drawn with the specified font.
protected abstract DrawingRectangleF MeasureTextCore(string text, GeoFont font)
Parameters¶
text
String
This parameter represents the text you want to measure.
font
GeoFont
This parameter represents the font of the text you want to measure.
Returns¶
This method returns the rectangle that contains the specified text, when that text is drawn
with the specified font.
Exceptions¶
ArgumentNullException
If you pass a null as the text, we will throw an ArgumentNullException.
ArgumentNullException
If you pass a null as the font, we will throw an ArgumentNullException.
ArgumentException
If you pass a blank string in the text parameter, we will throw an ArgumentException.
Remarks:
This method is typically used for labeling, to determine whether labels overlap.
BeginDrawing(Object, RectangleShape, GeographyUnit)¶
This method begins the act of drawing on the GeoCanvas.
public void BeginDrawing(object geoImage, RectangleShape worldExtent, GeographyUnit drawingMapUnit)
Parameters¶
geoImage
Object
This parameter represents the image you want the GeoCanvas to draw on.
worldExtent
RectangleShape
This parameter is the world extent of the canvasImage.
drawingMapUnit
GeographyUnit
This parameter is the map unit of the canvasImage.
Remarks:
This is the first method that needs to be called before any drawing takes place. Calling this method will set the IsDrawing property to true. When you finish drawing, you must call EndDrawing to commit the changes to the image.
BeginDrawingCore(Object, RectangleShape, GeographyUnit)¶
This method begins the act of drawing on the GeoCanvas.
protected abstract void BeginDrawingCore(object nativeImage, RectangleShape worldExtent, GeographyUnit drawingMapUnit)
Parameters¶
nativeImage
Object
This parameter represents the image you want the GeoCanvas to draw on.
worldExtent
RectangleShape
This parameter is the world extent of the canvasImage.
drawingMapUnit
GeographyUnit
This parameter is the map unit of the canvasImage.
Remarks:
This is the first method that needs to be called before any drawing takes place. Calling this method will set the IsDrawing property to true. When you finish drawing, you must call EndDrawing to commit the changes to the image.
EndDrawing()¶
This method ends drawing and commits the drawing on the GeoCanvas.
public void EndDrawing()
Remarks:
This method should be called when you are finished drawing. It will commit the image changes to the image you passed in on BeginDrawing. It will also set IsDrawing to false. After you call this method it will put the GeoCanvas into an invalid state, so if you then call any drawing methods it will raise an exception.
GetCanvasWidth()¶
This method gets the view width of the passed-in native image object.
protected float GetCanvasWidth()
Returns¶
Single
The returning view width.
Remarks:
This method is a BaseClass API and will be implemented and used in its sub-concrete classes.
GetCanvasWidthCore()¶
This method gets the view width of the passed-in native image object.
protected abstract float GetCanvasWidthCore()
Returns¶
Single
The returning view width.
Remarks:
This method is a BaseClass API and will be implemented and used in its sub-concrete classes.
GetCanvasHeight()¶
This method gets the view height of the passed-in native image object.
protected float GetCanvasHeight()
Returns¶
Single
The returning view height.
Remarks:
This method is a BaseClass API and will be implemented and used in its sub-concrete classes.
GetCanvasHeightCore()¶
This method gets the view height of the passed-in native image object.
protected abstract float GetCanvasHeightCore()
Returns¶
Single
The returning view height.
Remarks:
This method is a BaseClass API and will be implemented and used in its sub-concrete classes.
CreateDefaultGeoCanvas()¶
Creates the default geo canvas.
public static GeoCanvas CreateDefaultGeoCanvas()
Returns¶
Events¶
DrawingProgressChanged¶
Occurs when [drawing progress changed].
public event EventHandler<DrawingProgressChangedEventArgs> DrawingProgressChanged;