/// <summary>
 /// Creates a new Custom Polygon symbolizer with the specified properties
 /// </summary>
 /// <param name="uniqueName">the unique name</param>
 /// <param name="name">the name of the custom symbolizer</param>
 /// <param name="category">the map category of the custom symbolizer</param>
 /// <param name="symbolizer">the associated Polygon symbolizer</param>
 public CustomPolygonSymbolizer(string uniqueName, string name, string category, PolygonSymbolizer symbolizer)
 {
     base.UniqueName = uniqueName;
     base.Name = name;
     base.Category = category;
     base.Symbolizer = symbolizer;
 }
 /// <summary>
 /// Draws a preview of a polygon symbolizer inside of the specified rectangle
 /// </summary>
 private void DrawPolygonSymbolizer(PolygonSymbolizer sym, Graphics g, Rectangle rect)
 {
     if (sym != null)
     {
         g.Clear(Color.White);
         Rectangle rect2 = new Rectangle(5, 5, rect.Width - 10, rect.Height - 10);
         sym.Draw(g, rect2);
     }
 }
        private static List<CustomSymbolizer> getBasicPolygonSymbols()
        {
            List<CustomSymbolizer> lst = new List<CustomSymbolizer>();

            PolygonSymbolizer s1 = new PolygonSymbolizer();
            s1.SetFillColor(Color.Beige);
            lst.Add(new CustomSymbolizer(s1, "poly01", "polygon 1", "default"));

            PolygonSymbolizer s2 = new PolygonSymbolizer();
            s2.SetFillColor(Color.LightGreen);
            s2.SetOutlineWidth(2.0);
            s2.OutlineSymbolizer.SetFillColor(Color.Red);
            lst.Add(new CustomSymbolizer(s2, "poly02", "polygon 2", "category2"));

            return lst;
        }
 /// <summary>
 /// Creates a new PolygonCategory with the specified image being tiled within the category.  
 /// The simple outline characteristics are also defined.
 /// </summary>
 /// <param name="picture">The picture to draw</param>
 /// <param name="wrap">The way to wrap the picture</param>
 /// <param name="angle">The angle to rotate the image</param>
 /// <param name="outlineColor">The color to use</param>
 /// <param name="outlineWidth">The outline width</param>
 public PolygonCategory(Image picture, WrapMode wrap, double angle, Color outlineColor, double outlineWidth)
 {
     Symbolizer = new PolygonSymbolizer(picture, wrap, angle, outlineColor, outlineWidth);
     SelectionSymbolizer = new PolygonSymbolizer(Color.Cyan, Color.DarkCyan);
 }
 /// <summary>
 /// Creates a new PolygonCategory with the specified image being tiled within the category.  
 /// The s
 /// </summary>
 /// <param name="picture">The picture to draw</param>
 /// <param name="wrap">The way to wrap the picture</param>
 /// <param name="angle">The angle to rotate the image</param>
 public PolygonCategory(Image picture, WrapMode wrap, double angle)
 {
     Symbolizer = new PolygonSymbolizer(picture, wrap, angle);
     SelectionSymbolizer = new PolygonSymbolizer(Color.Cyan);
 }
 /// <summary>
 /// Specifies a category that is made up from a simple color.
 /// </summary>
 /// <param name="fillColor">The color to fill the polygons with</param>
 /// <param name="outlineColor">The border color for the polygons</param>
 /// <param name="outlineWidth">The width of the line drawn on the border</param>
 public PolygonCategory(Color fillColor, Color outlineColor, double outlineWidth)
 {
     Symbolizer = new PolygonSymbolizer(fillColor, outlineColor, outlineWidth);
     SelectionSymbolizer = new PolygonSymbolizer(Color.Cyan, Color.DarkCyan, outlineWidth);
 }
 /// <summary>
 /// Creates a new instance of PointSchemeCategory
 /// </summary>
 public PolygonCategory()
 {
     Symbolizer = new PolygonSymbolizer();
     SelectionSymbolizer = new PolygonSymbolizer(true);
 }
 /// <summary>
 /// Creates a new instanec of a default point scheme category where the geographic symbol size has been
 /// scaled to the specified extent.
 /// </summary>
 /// <param name="extent">The geographic extent that is 100 times wider than the geographic size of the points.</param>
 public PolygonCategory(IEnvelope extent)
 {
     Symbolizer = new PolygonSymbolizer(false, extent);
     SelectionSymbolizer = new PolygonSymbolizer(true, extent);
 }
 /// <summary>
 /// Creates a new instance of a Gradient Pattern using the specified colors and angle
 /// </summary>
 /// <param name="startColor">The start color</param>
 /// <param name="endColor">The end color</param>
 /// <param name="angle">The direction of the gradient</param>
 /// <param name="style">The type of gradient to use</param>
 /// <param name="outlineColor">The color to use for the border symbolizer</param>
 /// <param name="outlineWidth">The width of the line to use for the border symbolizer</param>
 public PolygonCategory(Color startColor, Color endColor, double angle, GradientTypes style, Color outlineColor, double outlineWidth)
 {
     Symbolizer = new PolygonSymbolizer(startColor, endColor, angle, style, outlineColor, outlineWidth);
     SelectionSymbolizer = new PolygonSymbolizer(Color.LightCyan, Color.DarkCyan, angle, style, Color.DarkCyan, outlineWidth);
 }
 /// <summary>
 /// Creates a new CustomSymbolizer for symbolizing Polygons
 /// </summary>
 public CustomPolygonSymbolizer()
 {
     Symbolizer = new PolygonSymbolizer();
 }