Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue-290 Default Layer color #298

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ACadSharp/CadDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ internal CadDocument(bool createDefaults)
//Entries
Layout modelLayout = Layout.Default;
Layout paperLayout = new Layout("Layout1");
(this.RootDictionary[CadDictionary.AcadLayout] as CadDictionary).Add(Layout.LayoutModelName, modelLayout);
(this.RootDictionary[CadDictionary.AcadLayout] as CadDictionary).Add(paperLayout.Name, paperLayout);
(this.RootDictionary[CadDictionary.AcadLayout] as CadDictionary).Add(Layout.LayoutModelName, modelLayout);

//Default variables
this.AppIds.Add(AppId.Default);
Expand Down
2 changes: 1 addition & 1 deletion ACadSharp/Tables/Layer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class Layer : TableEntry
/// if the index is negative, layer is off
/// </remarks>
[DxfCodeValue(62, 420, 430)]
public Color Color { get; set; }
public Color Color { get; set; } = new Color(7);

/// <summary>
/// The linetype of an object. The default linetype is the linetype of the layer (ByLayer).
Expand Down
2 changes: 1 addition & 1 deletion ACadSharp/Tables/TextStyle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public class TextStyle : TableEntry
/// A long value which contains a truetype font’s pitch and family, character set, and italic and bold flags
/// </summary>
[DxfCodeValue(DxfReferenceType.Optional, 1071)]
public FontFlags TrueType { get; set; }
public FontFlags TrueType { get; set; } = FontFlags.Regular;

internal TextStyle() : base() { }

Expand Down
Loading