예제 #1
0
        public override HatchStyle Clone()
        {
            HatchStyleSolid res = new HatchStyleSolid();

            res.Name  = base.Name;
            res.color = color;
            return(res);
        }
예제 #2
0
        void IAttributeList.Initialize()
        {
            HatchStyleSolid sol = new HatchStyleSolid();

            sol.Name  = StringTable.GetString("HatchStyleList.DefaultSolid");
            sol.Color = new ColorDef(sol.Name, Color.Red, ColorDef.ColorSource.fromStyle);
            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°
            Add(lin);
        }
예제 #3
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);
        }