Class GeoCanvas
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
-
GeoCanvas
- Derived
- Inherited Members
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.
Constructors
GeoCanvas()
This method is the default constructor for the GeoCanvas.
protected GeoCanvas()
Remarks
None
Properties
CancellationToken
Gets or sets the cancellation token source.
public CancellationToken CancellationToken { get; set; }
Property Value
- CancellationToken
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
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.
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
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.
Exceptions
- InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
Dpi
The DPI value for the final drawing result, only valid when HasDpi set to true.
public virtual float Dpi { get; set; }
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.
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 virtual double FontDisplayDensity { get; }
Property Value
Height
This property gets the height of the view.
public float Height { get; protected set; }
Property Value
Remarks
This property reflects the height of the view image that was passed in on BeginDrawing.
Exceptions
- InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
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.
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.
MapUnit
This property returns the MapUnit passed in on the BeginDrawingAPI in the GeoCanvas.
public GeographyUnit MapUnit { get; }
Property Value
NativeImage
The same reference to the parameter 'NativeImage' in BeginDrawing function.
public object NativeImage { get; }
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
- float
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.
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 virtual bool SupportKeyColor { get; }
Property Value
Remarks
The default value is false.
Width
This property gets the width of the view.
public float Width { get; protected set; }
Property Value
Remarks
This property reflects the width of the view image that was passed in on BeginDrawing.
Exceptions
- InvalidOperationException
In the event you attempt to call this method when the GeoCanvas' IsDrawing mode is false, it will throw an InvalidOperationException.
Methods
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
objectThis parameter represents the image you want the GeoCanvas to draw on.
worldExtent
RectangleShapeThis parameter is the world extent of the canvasImage.
drawingMapUnit
GeographyUnitThis 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
objectThis parameter represents the image you want the GeoCanvas to draw on.
worldExtent
RectangleShapeThis parameter is the world extent of the canvasImage.
drawingMapUnit
GeographyUnitThis 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.
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 virtual void ClearCore(GeoBrush fillBrush)
Parameters
fillBrush
GeoBrushThis 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.
CreateDefaultGeoCanvas()
Creates the default geo canvas.
public static GeoCanvas CreateDefaultGeoCanvas()
Returns
DrawArc(GeoPen, float, float, float, float, float, float, 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
GeoPenThe pen.
x
floatThe x.
y
floatThe y.
width
floatThe width.
height
floatThe height.
startAngle
floatThe start angle.
sweepAngle
floatThe sweep angle.
drawingLevel
DrawingLevelThe drawing level.
DrawArc(GeoPen, DrawingRectangleF, float, float, DrawingLevel)
Draws the arc.
public void DrawArc(GeoPen pen, DrawingRectangleF rect, float startAngle, float sweepAngle, DrawingLevel drawingLevel)
Parameters
pen
GeoPenThe pen.
rect
DrawingRectangleFThe rect.
startAngle
floatThe start angle.
sweepAngle
floatThe sweep angle.
drawingLevel
DrawingLevelThe drawing level.
DrawArcCore(GeoPen, float, float, float, float, float, float, 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
GeoPenThe pen.
x
floatThe x.
y
floatThe y.
width
floatThe width.
height
floatThe height.
startAngle
floatThe start angle.
sweepAngle
floatThe sweep angle.
drawingLevel
DrawingLevelThe drawing level.
DrawArea(IEnumerable<ScreenPointF[]>, GeoPen, GeoBrush, DrawingLevel, float, float, 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
GeoPenThis parameter describes the outline GeoPen that will be used to draw the AreaShape.
fillBrush
GeoBrushThis parameter describes the fill GeoBrush that will be used to draw the AreaShape.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen will draw on.
xOffset
floatThis parameter determines the X offset for the feature to be drawn.
yOffset
floatThis parameter determines the Y offset for the feature to be drawn.
penBrushDrawingOrder
PenBrushDrawingOrderThis parameter determines the PenBrushDrawingOrder used when drawing the area type feature.
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.
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.
DrawArea(AreaBaseShape, GeoBrush, DrawingLevel)
This method draws an area on the GeoCanvas.
public void DrawArea(AreaBaseShape shape, GeoBrush fillBrush, DrawingLevel drawingLevel)
Parameters
shape
AreaBaseShapeThis parameter is the area shape to be drawn.
fillBrush
GeoBrushThis parameter describes the fill Brush that will be used to draw the AreaShape.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen will draw on.
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.
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.
DrawArea(AreaBaseShape, GeoPen, DrawingLevel)
This method draws an area on the GeoCanvas.
public void DrawArea(AreaBaseShape shape, GeoPen outlinePen, DrawingLevel drawingLevel)
Parameters
shape
AreaBaseShapeThis parameter is the area shape.
outlinePen
GeoPenThis parameter describes the outline GeoPen that will be used to draw the area.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen will draw on.
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.
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.
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
AreaBaseShapeThis parameter is the area shape to be drawn.
outlinePen
GeoPenThis parameter describes the outline pen that will be used to draw the AreaShape.
fillBrush
GeoBrushThis parameter describes the fill Brush that will be used to draw the AreaShape.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen will draw on.
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.
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.
DrawArea(AreaBaseShape, GeoPen, GeoBrush, DrawingLevel, float, float, 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
AreaBaseShapeThis parameter is the area shape to be drawn.
outlinePen
GeoPenThis parameter describes the outline GeoPen that will be used to draw the AreaShape.
fillBrush
GeoBrushThis parameter describes the fill GeoBrush that will be used to draw the AreaShape.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen will draw on.
xOffset
floatThis parameter determines the X offset for the feature to be drawn.
yOffset
floatThis parameter determines the Y offset for the feature to be drawn.
penBrushDrawingOrder
PenBrushDrawingOrderThis parameter determines the PenBrushDrawingOrder used when drawing the area type feature.
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.
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.
DrawArea(Feature, GeoBrush, DrawingLevel)
This method draws an area on the GeoCanvas.
public void DrawArea(Feature feature, GeoBrush fillBrush, DrawingLevel drawingLevel)
Parameters
feature
FeatureThis parameter is the AreaShape in well-known binary format.
fillBrush
GeoBrushThis parameter describes the fill GeoBrush that will be used to draw the AreaShape.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen will draw on.
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.
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.
DrawArea(Feature, GeoPen, DrawingLevel)
This method draws an area on the GeoCanvas.
public void DrawArea(Feature feature, GeoPen outlinePen, DrawingLevel drawingLevel)
Parameters
feature
FeatureThis parameter is the area feature.
outlinePen
GeoPenThis parameter describes the outline GeoPen that will be used to draw the area.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen will draw on.
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.
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.
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
FeatureThis parameter is the AreaFeature to be drawn.
outlinePen
GeoPenThis parameter describes the outline GeoPen that will be used to draw the AreaShape.
fillBrush
GeoBrushThis parameter describes the fill GeoBrush that will be used to draw the AreaShape.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen will draw on.
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.
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.
DrawArea(Feature, GeoPen, GeoBrush, DrawingLevel, float, float, 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
FeatureThis parameter is the AreaFeature to be drawn.
outlinePen
GeoPenThis parameter describes the outline GeoPen that will be used to draw the AreaShape.
fillBrush
GeoBrushThis parameter describes the fill GeoBrush that will be used to draw the AreaShape.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen will draw on.
xOffset
floatThis parameter determines the X offset for the feature that will be drawn.
yOffset
floatThis parameter determines the Y offset for the feature that will be drawn.
penBrushDrawingOrder
PenBrushDrawingOrderThis parameter determines the PenBrushingDrawingOrder used when drawing the area type feature.
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.
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.
DrawAreaCore(IEnumerable<ScreenPointF[]>, GeoPen, GeoBrush, DrawingLevel, float, float, 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
GeoPenThis parameter describes the outline GeoPen that will be used to draw the AreaShape.
fillBrush
GeoBrushThis parameter describes the fill GeoBrush that will be used to draw the AreaShape.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen will draw on.
xOffset
floatThis parameter determines the X offset for the feature to be drawn.
yOffset
floatThis parameter determines the Y offset for the feature to be drawn.
penBrushDrawingOrder
PenBrushDrawingOrderThis parameter determines the PenBrushDrawingOrder used when drawing the area type feature.
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.
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.
DrawEllipse(Feature, float, float, GeoBrush, DrawingLevel)
Draws a point on the GeoCanvas.
public void DrawEllipse(Feature centerPointFeature, float width, float height, GeoBrush fillBrush, DrawingLevel drawingLevel)
Parameters
centerPointFeature
FeatureThis parameter is the center point feature.
width
floatThis parameter describes the width of the ellipse to be drawn.
height
floatThis parameter describes the height of the ellipse to be drawn.
fillBrush
GeoBrushThis parameter describes the fill GeoBrush that will be used to draw the point.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel the the GeoBrush will draw on.
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.
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.
DrawEllipse(Feature, float, float, GeoPen, DrawingLevel)
Draws a point on the GeoCanvas.
public void DrawEllipse(Feature feature, float width, float height, GeoPen outlinePen, DrawingLevel drawingLevel)
Parameters
feature
FeatureThis parameter is the center point feature.
width
floatThis parameter describes the width of the ellipse to be drawn.
height
floatThis parameter describes the height of the ellipse to be drawn.
outlinePen
GeoPenThis parameter describes the outline GeoPen that will be used to draw the point.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen will draw on.
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.
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.
DrawEllipse(Feature, float, float, 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
FeatureThis parameter is the center point feature.
width
floatThis parameter describes the width of the ellipse to be drawn.
height
floatThis parameter describes the height of the ellipse to be drawn.
outlinePen
GeoPenThis parameter describes the outline GeoPen that will be used to draw the point.
fillBrush
GeoBrushThis parameter describes the fill GeoBrush that will be used to draw the point.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen or GeoBrush will draw on.
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.
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.
DrawEllipse(Feature, float, float, GeoPen, GeoBrush, DrawingLevel, float, float, 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
FeatureThis parameter is the center point feature.
width
floatThis parameter describes the width of the ellipse to be drawn.
height
floatThis parameter describes the height of the ellipse to be drawn.
outlinePen
GeoPenThis parameter describes the outline GeoPen that will be used to draw the point.
fillBrush
GeoBrushThis parameter describes the fill GeoBrush that will be used to draw the point.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen or GeoBrush will draw on.
xOffset
floatThis parameter determines the X offset for the ellipse to be drawn.
yOffset
floatThis parameter determines the Y offset for the ellipse to be drawn.
penBrushDrawingOrder
PenBrushDrawingOrderThis parameter determines the PenBrushDrawingOrder used when drawing the ellipse.
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.
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.
DrawEllipse(PointBaseShape, float, float, GeoBrush, DrawingLevel)
Draws a point on the GeoCanvas.
public void DrawEllipse(PointBaseShape shape, float width, float height, GeoBrush fillBrush, DrawingLevel drawingLevel)
Parameters
shape
PointBaseShapeThis parameter is the center point shape.
width
floatThis parameter describes the width of the ellipse to be drawn.
height
floatThis parameter describes the height of the ellipse to be drawn.
fillBrush
GeoBrushThis parameter describes the fill GeoBrush that will be used to draw the point.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel the the GeoBrush will draw on.
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.
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.
DrawEllipse(PointBaseShape, float, float, GeoPen, DrawingLevel)
Draws a point on the GeoCanvas.
public void DrawEllipse(PointBaseShape shape, float width, float height, GeoPen outlinePen, DrawingLevel drawingLevel)
Parameters
shape
PointBaseShapeThis parameter is the center point shape.
width
floatThis parameter describes the width of the ellipse to be drawn.
height
floatThis parameter describes the height of the ellipse to be drawn.
outlinePen
GeoPenThis parameter describes the outline GeoPen that will be used to draw the point.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen will draw on.
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.
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.
DrawEllipse(PointBaseShape, float, float, 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
PointBaseShapeThis parameter is the center point shape.
width
floatThis parameter describes the width of the ellipse to be drawn.
height
floatThis parameter describes the height of the ellipse to be drawn.
outlinePen
GeoPenThis parameter describes the outline GeoPen that will be used to draw the point.
fillBrush
GeoBrushThis parameter describes the fill GeoBrush that will be used to draw the point.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen or GeoBrush will draw on.
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.
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.
DrawEllipse(PointBaseShape, float, float, GeoPen, GeoBrush, DrawingLevel, float, float, 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
PointBaseShapeThis parameter is the center point shape.
width
floatThis parameter describes the width of the ellipse to be drawn.
height
floatThis parameter describes the height of the ellipse to be drawn.
outlinePen
GeoPenThis parameter describes the outline GeoPen that will be used to draw the point.
fillBrush
GeoBrushThis parameter describes the fill GeoBrush that will be used to draw the point.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen or GeoBrush will draw on.
xOffset
floatThis parameter determines the X offset for the ellipse to be drawn.
yOffset
floatThis parameter determines the Y offset for the ellipse to be drawn.
penBrushDrawingOrder
PenBrushDrawingOrderThis parameter determines the PenBrushDrawingOrder used when drawing the ellipse.
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.
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.
DrawEllipse(ScreenPointF, float, float, GeoPen, GeoBrush, DrawingLevel, float, float, 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
ScreenPointFThis parameter is the center point in screen coordinate.
width
floatThis parameter describes the width of the ellipse to be drawn.
height
floatThis parameter describes the height of the ellipse to be drawn.
outlinePen
GeoPenThis parameter describes the outline GeoPen that will be used to draw the point.
fillBrush
GeoBrushThis parameter describes the fill GeoBrush that will be used to draw the point.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen or GeoBrush will draw on.
xOffset
floatThis parameter determines the X offset for the ellipse to be drawn.
yOffset
floatThis parameter determines the Y offset for the ellipse to be drawn.
penBrushDrawingOrder
PenBrushDrawingOrder
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.
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.
DrawEllipseCore(ScreenPointF, float, float, GeoPen, GeoBrush, DrawingLevel, float, float, 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
ScreenPointFThis parameter is the center point in well-known binary format.
width
floatThis parameter describes the width of the ellipse to be drawn.
height
floatThis parameter describes the height of the ellipse to be drawn.
outlinePen
GeoPenThis parameter describes the outline GeoPen that will be used to draw the point.
fillBrush
GeoBrushThis parameter describes the fill GeoBrush that will be used to draw the point.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen or GeoBrush will draw on.
xOffset
floatThis parameter determines the X offset for the screenPoint to be drawn.
yOffset
floatThis parameter determines the Y offset for the screenPoint to be drawn.
penBrushDrawingOrder
PenBrushDrawingOrderThis parameter determines the PenBrushDrawingOrder used when drawing the ellipse.
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.
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.
DrawLine(IEnumerable<ScreenPointF>, GeoPen, DrawingLevel, float, float)
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
GeoPenThis parameter describes the GeoPen that will be used to draw the LineShape.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen will draw on.
xOffset
floatThis parameter determines the X offset for the feature to be drawn.
yOffset
floatThis parameter determines the Y offset for the feature to be drawn.
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.
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.
DrawLine(Feature, GeoPen, DrawingLevel)
Draws a line on the GeoCanvas.
public void DrawLine(Feature feature, GeoPen linePen, DrawingLevel drawingLevel)
Parameters
feature
FeatureThis parameter is the line feature.
linePen
GeoPenThis parameter describes the GeoPen that will be used to draw the line.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen will draw on.
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.
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.
DrawLine(Feature, GeoPen, DrawingLevel, float, float)
Draws a line on the GeoCanvas.
public void DrawLine(Feature feature, GeoPen linePen, DrawingLevel drawingLevel, float xOffset, float yOffset)
Parameters
feature
FeatureThis parameter is the line feature to be drawn by GeoCannvas.
linePen
GeoPenThis parameter describes the GeoPen that will be used to draw the line.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen will draw on.
xOffset
floatThis parameter determines the X offset for the feature to be drawn.
yOffset
floatThis parameter determines the Y offset for the feature to be drawn.
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.
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.
DrawLine(LineBaseShape, GeoPen, DrawingLevel)
Draws a line on the GeoCanvas.
public void DrawLine(LineBaseShape shape, GeoPen linePen, DrawingLevel drawingLevel)
Parameters
shape
LineBaseShapeThis parameter is the line shape to be drawn by GeoCannvas.
linePen
GeoPenThis parameter describes the GeoPen that will be used to draw the line.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen will draw on.
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.
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.
DrawLine(LineBaseShape, GeoPen, DrawingLevel, float, float)
Draws a line on the GeoCanvas.
public void DrawLine(LineBaseShape shape, GeoPen linePen, DrawingLevel drawingLevel, float xOffset, float yOffset)
Parameters
shape
LineBaseShapeThis parameter is the line shape to be drawn by GeoCannvas.
linePen
GeoPenThis parameter describes the GeoPen that will be used to draw the line.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen will draw on.
xOffset
floatThis parameter determines the X offset for the feature to be drawn.
yOffset
floatThis parameter determines the Y offset for the feature to be drawn.
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.
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.
DrawLineCore(IEnumerable<ScreenPointF>, GeoPen, DrawingLevel, float, float)
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
GeoPenThis parameter describes the GeoPen that will be used to draw the LineShape.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel that the GeoPen will draw on.
xOffset
floatThis parameter determines the X offset for the feature to be drawn.
yOffset
floatThis parameter determines the Y offset for the feature to be drawn.
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.
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.
DrawScreenImage(GeoImage, float, float, float, float, DrawingLevel, float, float, float)
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
GeoImageThe image you want to draw.
centerXInScreen
floatThe X coordinate of the center point (in screen coordinates) of where you want to draw the image.
centerYInScreen
floatThe Y coordinate of the center point (in screen coordinates) of where you want to draw the image.
widthInScreen
floatThe width you want to scale the image to. This is the width of the image that will be drawn.
heightInScreen
floatThe height you want to scale the image to. This is the height of the image that will be drawn.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel the image will draw on.
xOffset
floatThis parameter determines the X offset for the image to be drawn.
yOffset
floatThis parameter determines the Y offset for the image to be drawn.
rotateAngle
floatThis parameter determines the rotation angle for the image to be drawn.
Remarks
Drawing an image scaled is slower than using the API that draws it unscaled.
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.
DrawScreenImageCore(GeoImage, float, float, float, float, DrawingLevel, float, float, float)
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
GeoImageThe image you want to draw.
centerXInScreen
floatThe X coordinate of the center point (in screen coordinates) of where you want to draw the image.
centerYInScreen
floatThe Y coordinate of the center point (in screen coordinates) of where you want to draw the image.
widthInScreen
floatThe width you want to scale the image to. This is the width of the image that will be drawn.
heightInScreen
floatThe height you want to scale the image to. This is the height of the image that will be drawn.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel the image will draw on.
xOffset
floatThis parameter determines the X offset for the image to be drawn.
yOffset
floatThis parameter determines the Y offset for the image to be drawn.
rotateAngle
floatThis parameter determines the rotation angle for the image to be drawn.
Remarks
Drawing an image scaled is slower than using the API that draws it unscaled.
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.
DrawScreenImageWithoutScaling(GeoImage, float, float, DrawingLevel, float, float, float)
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
GeoImageThe image you want to draw unscaled.
centerXInScreen
floatThe X coordinate of the center point (in screen coordinates) of where you want to draw the image.
centerYInScreen
floatThe Y coordinate of the center point (in screen coordinates) of where you want to draw the image.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel the image will draw on.
xOffset
floatThis parameter determines the X offset for the image to be drawn.
yOffset
floatThis parameter determines the Y offset for the image to be drawn.
rotateAngle
floatThis parameter determines the rotation angle for the image to be drawn.
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.
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.
DrawScreenImageWithoutScalingCore(GeoImage, float, float, DrawingLevel, float, float, float)
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
GeoImageThe image you want to draw unscaled.
centerXInScreen
floatThe X coordinate of the center point (in screen coordinates) of where you want to draw the image.
centerYInScreen
floatThe Y coordinate of the center point (in screen coordinates) of where you want to draw the image.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel the image will draw on.
xOffset
floatThis parameter determines the X offset for the image to be drawn.
yOffset
floatThis parameter determines the Y offset for the image to be drawn.
rotateAngle
floatThis parameter determines the rotation angle for the image to be drawn.
Remarks
Drawing an image unscaled is faster than using the API that scales it.
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.
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
stringThis parameter specifies the text you wish to draw.
font
GeoFontThis parameter represents the font you wish to use to draw the text.
fillBrush
GeoBrushThis 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
DrawingLevelThis 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, float, float, 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
stringThe text.
font
GeoFontThe font.
fillBrush
GeoBrushThe fill brush.
haloPen
GeoPenThe halo pen.
textPathInScreen
IEnumerable<ScreenPointF>The text path in screen.
drawingLevel
DrawingLevelThe drawing level.
xOffset
floatThe x offset.
yOffset
floatThe y offset.
drawingTextAlignment
DrawingTextAlignmentThe drawing text alignment.
DrawText(string, GeoFont, GeoBrush, GeoPen, IEnumerable<ScreenPointF>, DrawingLevel, float, float, DrawingTextAlignment, float)
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
stringThis parameter specifies the text you wish to draw.
font
GeoFontThis parameter represents the font you wish to use to draw the text.
fillBrush
GeoBrushThis parameter specifies the kind of fill you want to use to draw the text.
haloPen
GeoPenThis 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
DrawingLevelThis parameter specifies the drawing level you wish to draw the text on. Higher levels overwrite lower levels.
xOffset
floatThis parameter determines the X offset for the text to be drawn.
yOffset
floatThis parameter determines the Y offset for the text to be drawn.
drawingTextAlignment
DrawingTextAlignmentThis parameter determines text alignment for the text to be drawn.
rotateAngle
floatThis 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, float, float, DrawingTextAlignment, float)
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
stringThis parameter specifies the text you wish to draw.
font
GeoFontThis parameter represents the font you wish to use to draw the text.
fillBrush
GeoBrushThis parameter specifies the kind of fill you want to use to draw the text.
haloPen
GeoPenThis 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
DrawingLevelThis parameter specifies the drawing level you wish to draw the text on. Higher levels overwrite lower levels.
xOffset
floatThis parameter determines the X offset for the text to be drawn.
yOffset
floatThis parameter determines the Y offset for the text to be drawn.
drawingTextAlignment
DrawingTextAlignmentThis parameter determines text alignment for the text to be drawn.
rotateAngle
floatThis parameter determines the rotation angle for the text to be drawn.
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.
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.
DrawTextWithScreenCoordinate(string, GeoFont, GeoBrush, float, float, 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
stringThis parameter specifies the text you wish to draw.
font
GeoFontThis parameter represents the font you wish to use to draw the text.
fillBrush
GeoBrushThis parameter specifies the kind of fill you want to use to draw the text.
upperLeftXInScreen
floatThis parameter is the upper left horizontal point in screen coordinates of where you want to start drawing the text from.
upperLeftYInScreen
floatThis parameter is the upper left vertical point in screen coordinates of where you want to start drawing the text from.
drawingLevel
DrawingLevelThis parameter specifies the drawing level you wish to draw the text on. Higher levels overwrite lower levels.
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.
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.
DrawTextWithScreenCoordinate(string, GeoFont, GeoBrush, GeoPen, float, float, 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
stringThe text.
font
GeoFontThe font.
fillBrush
GeoBrushThe fill brush.
haloPen
GeoPenThe halo pen.
upperLeftXInScreen
floatThe upper left x in screen.
upperLeftYInScreen
floatThe upper left y in screen.
drawingLevel
DrawingLevelThe 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 = DrawingTextAlignment.Default)
Parameters
text
stringThis parameter specifies the text you wish to draw.
font
GeoFontThis parameter represents the font you wish to use to draw the text.
fillBrush
GeoBrushThis parameter specifies the kind of fill you want to use to draw the text.
upperLeftXInWorld
doubleThis parameter is the upper left horizontal point in world coordinates of where you want to start drawing the text from.
upperLeftYInWorld
doubleThis parameter is the upper left horizontal point in world coordinates of where you want to start drawing the text from.
drawingLevel
DrawingLevelThis parameter specifies the drawing level you wish to draw the text on. Higher levels overwrite lower levels.
drawingTextAlignment
DrawingTextAlignment
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.
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.
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 = DrawingTextAlignment.Default)
Parameters
text
stringThe text.
font
GeoFontThe font.
fillBrush
GeoBrushThe fill brush.
haloPen
GeoPenThe halo pen.
upperLeftXInWorld
doubleThe upper left x in world.
upperLeftYInWorld
doubleThe upper left y in world.
drawingLevel
DrawingLevelThe drawing level.
drawingTextAlignment
DrawingTextAlignment
DrawWorldImage(GeoImage, double, double, double, DrawingLevel, float, float, float)
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
GeoImageThe image you want to draw.
centerXInWorld
doubleThe X coordinate of the center point of where you want to draw the image.
centerYInWorld
doubleThe Y coordinate of the center point of where you want to draw the image.
imageScale
doubleThe scale at which you want to draw the image. The final width and height will be caculated based on the scale.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel the image will draw on.
xOffset
floatThis parameter determines the X offset for the image to be drawn.
yOffset
floatThis parameter determines the Y offset for the image to be drawn.
rotateAngle
floatThis parameter determines the rotation angle for the image to be drawn.
Remarks
Drawing an image scaled is slower than using the API that draws it unscaled.
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.
DrawWorldImage(GeoImage, double, double, float, float, 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
GeoImageThe image you want to draw.
centerXInWorld
doubleThe X coordinate of the center point of where you want to draw the image.
centerYInWorld
doubleThe Y coordinate of the center point of where you want to draw the image.
widthInScreen
floatThe width you want to scale the image to. This is the width of the image that will be drawn.
heightInScreen
floatThe height you want to scale the image to. This is the height of the image that will be drawn.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel the image will draw on.
Remarks
Drawing an image scaled is slower than using the API that draws it unscaled.
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.
DrawWorldImage(GeoImage, double, double, float, float, DrawingLevel, float, float, float)
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
GeoImageThe image you want to draw.
centerXInWorld
doubleThe X coordinate of the center point of where you want to draw the image.
centerYInWorld
doubleThe Y coordinate of the center point of where you want to draw the image.
widthInScreen
floatThe width you want to scale the image to. This is the width of the image that will be drawn.
heightInScreen
floatThe height you want to scale the image to. This is the height of the image that will be drawn.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel the image will draw on.
xOffset
floatThis parameter determines the X offset for the image to be drawn.
yOffset
floatThis parameter determines the Y offset for the image to be drawn.
rotateAngle
floatThis parameter determines the rotation angle for the image to be drawn.
Remarks
Drawing an image scaled is slower than using the API that draws it unscaled.
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.
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
GeoImageThe image you want to draw unscaled.
centerXInWorld
doubleThe X coordinate of the center point of where you want to draw the image.
centerYInWorld
doubleThe Y coordinate of the center point of where you want to draw the image.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel the image will draw on.
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.
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.
DrawWorldImageWithoutScaling(GeoImage, double, double, DrawingLevel, float, float, float)
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
GeoImageThe image you want to draw unscaled.
centerXInWorld
doubleThe X coordinate of the center point (in world coordinates) of where you want to draw the image.
centerYInWorld
doubleThe Y coordinate of the center point (in world coordinates) of where you want to draw the image.
drawingLevel
DrawingLevelThis parameter determines the DrawingLevel the image will draw on.
xOffset
floatThis parameter determines the X offset for the image to be drawn.
yOffset
floatThis parameter determines the Y offset for the image to be drawn.
rotateAngle
floatThis parameter determines the rotation angle for the image to be drawn.
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.
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.
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.
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.
GetCanvasHeight()
This method gets the view height of the passed-in native image object.
protected float GetCanvasHeight()
Returns
- float
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
- float
The returning view height.
Remarks
This method is a BaseClass API and will be implemented and used in its sub-concrete classes.
GetCanvasWidth()
This method gets the view width of the passed-in native image object.
protected float GetCanvasWidth()
Returns
- float
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
- float
The returning view width.
Remarks
This method is a BaseClass API and will be implemented and used in its sub-concrete classes.
MeasureOffset(double)
public double MeasureOffset(double offsetInPixel)
Parameters
offsetInPixel
double
Returns
MeasureOffsetCore(double)
protected virtual double MeasureOffsetCore(double offsetInPixel)
Parameters
offsetInPixel
double
Returns
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
stringThis parameter represents the text you want to measure.
font
GeoFontThis parameter represents the font of the text you want to measure.
Returns
- DrawingRectangleF
This method returns the rectangle that contains the specified text, when that text is drawn with the specified font.
Remarks
This method is typically used for labeling, to determine whether labels overlap.
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.
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
stringThis parameter represents the text you want to measure.
font
GeoFontThis parameter represents the font of the text you want to measure.
Returns
- DrawingRectangleF
This method returns the rectangle that contains the specified text, when that text is drawn with the specified font.
Remarks
This method is typically used for labeling, to determine whether labels overlap.
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.
OnDrawingProgressChanged(DrawingProgressChangedEventArgs)
Raises the DrawingProgressChanged event.
protected virtual void OnDrawingProgressChanged(DrawingProgressChangedEventArgs e)
Parameters
e
DrawingProgressChangedEventArgsThe DrawingProgressChangedEventArgs instance containing the event data.
Events
DrawingProgressChanged
Occurs when [drawing progress changed].
public event EventHandler<DrawingProgressChangedEventArgs> DrawingProgressChanged