Ejemplo n.º 1
0
        /// <summary>
        /// </summary>
        /// <returns></returns>
        public static HatchStyleList GetDefault(IAttributeListContainer container)
        {
            HatchStyleList  res = new HatchStyleList();
            HatchStyleSolid sol = new HatchStyleSolid();

            sol.Name  = StringTable.GetString("HatchStyleList.DefaultSolid");
            sol.Color = container.ColorList.Current;
            res.Add(sol);
            HatchStyleLines lin = new HatchStyleLines();

            lin.Name         = StringTable.GetString("HatchStyleList.DefaultLines");
            lin.LineDistance = 10.0;
            lin.LineAngle    = new Angle(1.0, 1.0); // 45°
            lin.ColorDef     = container.ColorList.Current;
            lin.LineWidth    = container.LineWidthList.Current;
            lin.LinePattern  = container.LinePatternList.Current;
            res.Add(lin);
            return(res);
        }
Ejemplo n.º 2
0
        public HatchStyleList Clone()
        {
            HatchStyleList res = new HatchStyleList();

            foreach (DictionaryEntry de in entries)
            {
                HatchStyle cloned = (de.Value as HatchStyle).Clone();
                res.Add(cloned);
                if ((de.Value as HatchStyle) == current)
                {
                    res.current = cloned;
                }
            }
            return(res);
        }