Exemplo n.º 1
0
        public override void FillPolygon(GravurGIS.Styles.StyleBrush brush, System.Drawing.Point[] points)
        {
            StyleColor color = brush.Color;

            _graphics.FillPolygon(new SolidBrush(Color.FromArgb(color.R, color.G, color.B)), points);
        }
Exemplo n.º 2
0
        public override void FillRectangle(GravurGIS.Styles.StyleBrush brush, System.Drawing.Rectangle rectangle)
        {
            StyleColor color = brush.Color;

            _graphics.FillRectangle(new SolidBrush(Color.FromArgb(color.R, color.G, color.B)), rectangle);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Creates a new pen with the given <see cref="StyleBrush"/>
 /// and <paramref name="width"/>.
 /// </summary>
 /// <param name="backgroundBrush">
 /// The StyleBrush which describes the color of the line.
 /// </param>
 /// <param name="width">The width of the line.</param>
 public StylePen(StyleBrush backgroundBrush, float width)
 {
     _backgroundBrush = backgroundBrush;
         _width = width;
 }
Exemplo n.º 4
0
        private static String printBrushes(StyleBrush[] brushes)
        {
            if (brushes == null || brushes.Length == 0)
                    return String.Empty;

                StringBuilder buffer = new StringBuilder();

                foreach (StyleBrush brush in brushes)
                {
                    buffer.Append(brush.ToString());
                    buffer.Append(", ");
                }

                buffer.Length -= 2;
                return buffer.ToString();
        }
Exemplo n.º 5
0
        private static Int32 getStyleBrushesArrayHashCode(StyleBrush[] brushes)
        {
            Int32 hashCode = -1720831040;

                if (brushes != null)
                {
                    foreach (StyleBrush brush in brushes)
                    {
                        hashCode ^= brush.GetHashCode();
                    }
                }

                return hashCode;
        }
Exemplo n.º 6
0
 /// <summary>
 /// Creates a new pen with the given <see cref="StyleBrush"/>
 /// and <paramref name="width"/>.
 /// </summary>
 /// <param name="backgroundBrush">
 /// The StyleBrush which describes the color of the line.
 /// </param>
 /// <param name="width">The width of the line.</param>
 public StylePen(StyleBrush backgroundBrush, float width)
 {
     _backgroundBrush = backgroundBrush;
     _width           = width;
 }