public Document() { Database = new Database(); Selections = new Selections(); _commonColors = new CommonColors(); _currLayerId = Database.layerTable["0"].id; _currColor = CADColor.ByLayer; }
public GridLayer(IDrawing drawing) { _drawing = drawing; CrossSize = 10; SpacingX = SpacingY = 10; MinSize = 15; GridStyle = GridStyle.Lines; Color = CADColor.FromArgb(255, 0, 0); }
public override bool Read(string name, out CADColor value) { XmlNode node = _curXmlNode.SelectSingleNode(name); if (node == null) { value = CADColor.ByLayer; return(false); } return(CADColor.TryParse(node.InnerText, out value)); }
public static Color WPFColor(CADColor color) { if (Colors.ContainsKey(color.GUID)) { return(Colors[color.GUID]); } var wpf = ConvertToWPF(color); Colors.Add(color.GUID, wpf); return(wpf); }
public static CADColor ConvertToCAD(Color color) { return(CADColor.FromArgb(color.R, color.G, color.B)); }
public static Color ConvertToWPF(this CADColor color) { return(Color.FromRgb(color.r, color.g, color.b)); }
public override bool Write(string name, CADColor value) { return(_Write(name, value)); }
public abstract bool Read(string name, out CADColor color);
public abstract bool Write(string name, CADColor color);