Exemple #1
0
 public void Save(gView.Framework.IO.IPersistStream stream)
 {
     stream.Save("MinValue", MinValue);
     stream.Save("MaxValue", MaxValue);
     stream.Save("Color", Color.ToArgb());
     stream.Save("Legend", Legend);
 }
        /// <summary>
        /// Adds a mapping from the given RGB color to the given ARGB color.
        /// </summary>
        /// <param name="source">The source RGB color.</param>
        /// <param name="destination">The destination ARGB color.</param>
        /// <exception cref="T:System.ArgumentException">The <paramref name="source"/> and <paramref name="destination"/> colors are
        /// identical, and thus this mapping is trivial.</exception>
        public void AddMapping(RgbColor source, ArgbColor destination)
        {
            if (source.ToArgb() == destination.ToArgb())
                throw new ArgumentException(
                    "source and destination colors are identical. Trivial mappings may not be explicitly defined.");

            map.Add(source, destination);
        }
Exemple #3
0
        public void Save(IPersistStream stream)
        {
            base.Save(stream);

            stream.Save("forecolor", _forecolor.ToArgb());
            stream.Save("backcolor", _backcolor.ToArgb());
            stream.Save("hatchstyle", (int)_hatchStyle);
            if (_outlineSymbol != null)
            {
                stream.Save("outlinesymbol", _outlineSymbol);
            }
        }
Exemple #4
0
 static public Color ToGdiColor(this ArgbColor color)
 {
     return(Color.FromArgb(color.ToArgb()));
 }
Exemple #5
0
 private void WriteFillColor(ArgbColor col)
 {
     _sw.WriteLine(@"<CssParameter name=""fill"">" + System.Drawing.ColorTranslator.ToHtml(System.Drawing.Color.FromArgb(col.ToArgb())) + "</CssParameter>");
     if (col.A != 255)
     {
         _sw.WriteLine(@"<CssParameter name=""fill-opacity"">" + ((float)(col.A / 255f)).ToString(_nhi) + "</CssParameter>");
     }
 }