Class HueFamilyAreaStyle
This class is used to draw area features.
public class HueFamilyAreaStyle : AreaStyle
- Inheritance
-
HueFamilyAreaStyle
- Inherited Members
Remarks
You should use this class to draw area features. You can specify a base color and the number of colors you want based on that color to draw the interior, and you can specify an outline pen with which to draw the border. You can optionally choose to use only the outline pen or the fill brush to generate different effects.
Constructors
HueFamilyAreaStyle()
This is the constructor for the class. If you use this constructor, then you need to set the required properties manually.
public HueFamilyAreaStyle()
Remarks
None
HueFamilyAreaStyle(GeoPen, GeoColor, int)
This is the constructor the for the class.
public HueFamilyAreaStyle(GeoPen outlinePen, GeoColor baseColor, int numberOfColors)
Parameters
outlinePen
GeoPenThis parameter represents the outline pen that will be used on the style.
baseColor
GeoColorThis parameter represents the base color that will be used in the class.
numberOfColors
intThis prameter represents how many colors will be used in the style, based on the base color.
Remarks
None.
HueFamilyAreaStyle(GeoPen, GeoColor, int, PenBrushDrawingOrder)
This is the constructor the for the class.
public HueFamilyAreaStyle(GeoPen outlinePen, GeoColor baseColor, int numberOfColors, PenBrushDrawingOrder penBrushDrawingOrder)
Parameters
outlinePen
GeoPenThis parameter represents the outline pen that will be used on the style.
baseColor
GeoColorThis parameter represents the base color that will be used in the class.
numberOfColors
intThis prameter represents how many colors will be used in the style, based on the base color.
penBrushDrawingOrder
PenBrushDrawingOrderThis parameter describes the PenBrushDrawingOrder that will be used when drawing the area type feature.
Remarks
None.
Properties
BaseColor
This gets or sets the base color of the style.
public GeoColor BaseColor { get; set; }
Property Value
- GeoColor
This gets or sets the base color of the style.
Remarks
None.
Cache
This gets the cached style in the class.
public Dictionary<string, AreaStyle> Cache { get; }
Property Value
- Dictionary<string, AreaStyle>
This gets the cached style in the class.
Remarks
This gets the cached style in the class. The key of the style in the cache is feature.Id & feature.GetHashCode().
NumberOfColors
This gets or sets the number of colors in the style.
public int NumberOfColors { get; set; }
Property Value
- int
This gets or sets the number of colors in the style.
Remarks
None.
Methods
ClearCache()
This method clears the cached style in the cache.
public void ClearCache()
Remarks
This method clears the cached style in the cache.
DrawCore(IEnumerable<Feature>, GeoCanvas, Collection<SimpleCandidate>, Collection<SimpleCandidate>)
This method draws the features on the view you provided.
protected override void DrawCore(IEnumerable<Feature> features, GeoCanvas canvas, Collection<SimpleCandidate> labelsInThisLayer, Collection<SimpleCandidate> labelsInAllLayers)
Parameters
features
IEnumerable<Feature>This parameter represents the features you want to draw on the view.
canvas
GeoCanvasThis parameter represents the view you want to draw the features on.
labelsInThisLayer
Collection<SimpleCandidate>The labels will be drawn in the current layer only.
labelsInAllLayers
Collection<SimpleCandidate>The labels will be drawn in all layers.
Remarks
This overridden method is called from the concrete public method Draw. In this
method, we take the features you passed in and draw them on the view you provided.
Each style (based on its properties) may draw each feature differently.
When overriding this method, consider each feature and its column data values. You can
use the full power of the GeoCanvas to do the drawing. If you need column data for a
feature, be sure to override the GetRequiredColumnNamesCore and add the columns you need
to the collection. In many of the styles, we add properties to allow the user to specify
which field they need; then, in the GetRequiredColumnNamesCore, we read that property and
add it to the collection.
Exceptions
- InvalidOperationException
In the event you attempt to call this method when the GeoCanvas's IsDrawing mode is false, it will throw an InvalidOperationException.
- ArgumentNullException
If you pass a null as the view, we will throw an ArgumentNullException.
- ArgumentNullException
If you pass a null as the features, we will throw an ArgumentNullException.
- ArgumentNullException
If OutlinePen is null, we will throw an ArgumentNullException.
- ArgumentNullException
If FillSolidBrush is null, we will throw an ArgumentNullException.