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); }
public override HatchStyle Clone() { HatchStyleLines res = new HatchStyleLines(); res.Name = base.Name; res.lineAngle = lineAngle; res.lineDistance = lineDistance; res.marginOffset = marginOffset; res.number = number; res.offset = offset; res.alternate = alternate; res.lineWidth = lineWidth; res.linePattern = linePattern; res.colorDef = colorDef; return(res); }
/// <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); }