Skip to content

Commit

Permalink
fix default values in object spec
Browse files Browse the repository at this point in the history
  • Loading branch information
brettfo committed Dec 4, 2022
1 parent 2449c4f commit a634063
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/IxMilia.Dwg.Generator/Spec/Objects.xml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
<Property Name="XScale" Type="double" BinaryType="BD" DefaultValue="1.0" />
<Property Name="YScale" Type="double" BinaryType="BD" DefaultValue="1.0" />
<Property Name="ZScale" Type="double" BinaryType="BD" DefaultValue="1.0" />
<Property Name="Rotation" Type="double" BinaryType="BD" DefaultValue="1.0" />
<Property Name="Rotation" Type="double" BinaryType="BD" DefaultValue="0.0" />
<Property Name="Extrusion" Type="DwgVector" BinaryType="3BD" DefaultValue="DwgVector.ZAxis" ReadConverter="Converters.TripleVector({0})" WriteConverter="Converters.TripleVector({0})" />
<Property Name="_hasAttributes" Type="bool" BinaryType="B" DefaultValue="false" Accessibility="internal" />
<ObjectSizeEnd />
Expand Down Expand Up @@ -254,7 +254,7 @@
<Object Name="Line" Value="0x13" IsEntity="true" ConstructorAccessibility="internal">
<Property Name="P1" Type="DwgPoint" BinaryType="3BD" DefaultValue="DwgPoint.Origin" ReadConverter="Converters.TriplePoint({0})" WriteConverter="Converters.TriplePoint({0})" />
<Property Name="P2" Type="DwgPoint" BinaryType="3BD" DefaultValue="DwgPoint.Origin" ReadConverter="Converters.TriplePoint({0})" WriteConverter="Converters.TriplePoint({0})" />
<Property Name="Thickness" Type="double" BinaryType="BD" DefaultValue="1.0" />
<Property Name="Thickness" Type="double" BinaryType="BD" DefaultValue="0.0" />
<Property Name="Extrusion" Type="DwgVector" BinaryType="3BD" DefaultValue="DwgVector.ZAxis" ReadConverter="Converters.TripleVector({0})" WriteConverter="Converters.TripleVector({0})" />
<ObjectSizeEnd />
</Object>
Expand Down Expand Up @@ -743,7 +743,7 @@
<Property Name="IsXRef" Type="bool" BinaryType="B" DefaultValue="false" />
<Property Name="IsOverlaidXref" Type="bool" BinaryType="B" DefaultValue="false" />
<Property Name="BasePoint" Type="DwgPoint" BinaryType="3BD" DefaultValue="DwgPoint.Origin" ReadConverter="Converters.TriplePoint({0})" WriteConverter="Converters.TriplePoint({0})" />
<Property Name="PathName" Type="string" BinaryType="T" DefaultValue="null" />
<Property Name="PathName" Type="string" BinaryType="T" DefaultValue="string.Empty" />
<ObjectSizeEnd />

<!-- handles -->
Expand Down Expand Up @@ -858,8 +858,8 @@
<Property Name="_nullHandleReference" Type="DwgHandleReference" BinaryType="H" DefaultValue="new DwgHandleReference(4, 0)" SkipCreation="true" />
<Property Name="_xDictionaryObjectHandleReference" Type="DwgHandleReference" BinaryType="H" DefaultValue="new DwgHandleReference(3, 0)" SkipCreation="true" />
<Property Name="_entityHandleReferences" Type="DwgHandleReference" BinaryType="H" DefaultValue="new List&lt;DwgHandleReference&gt;()" SkipCreation="true" ReadCount="_entityCount" />
<Property Name="_byLayerHandleReference" Type="DwgHandleReference" BinaryType="H" DefaultValue="new DwgHandleReference(3, 0)" Accessibility="internal" />
<Property Name="_byBlockHandleReference" Type="DwgHandleReference" BinaryType="H" DefaultValue="new DwgHandleReference(3, 0)" Accessibility="internal" />
<Property Name="_byLayerHandleReference" Type="DwgHandleReference" BinaryType="H" DefaultValue="new DwgHandleReference(3, 0)" Accessibility="internal" />
</Object>
<!--
Expand Down
4 changes: 2 additions & 2 deletions src/IxMilia.Dwg.Test/RawObjectReadTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1644,8 +1644,8 @@ public void ReadRawLineTypeControl()
Assert.Equal(new DwgHandle(0x05), lc.Handle);
Assert.Equal(1, lc._entityCount);
Assert.Equal(new DwgHandle(0x15), lc.ResolveHandleReference(lc._entityHandleReferences[0]));
Assert.Equal(new DwgHandle(0x13), lc.ResolveHandleReference(lc._byLayerHandleReference));
Assert.Equal(new DwgHandle(0x14), lc.ResolveHandleReference(lc._byBlockHandleReference));
Assert.Equal(new DwgHandle(0x13), lc.ResolveHandleReference(lc._byBlockHandleReference));
Assert.Equal(new DwgHandle(0x14), lc.ResolveHandleReference(lc._byLayerHandleReference));
}

[Fact]
Expand Down
2 changes: 1 addition & 1 deletion src/IxMilia.Dwg/Objects/DwgLineTypeControlObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ private static bool IsHardCodedname(string name)
public static DwgLineTypeControlObject Create(params DwgLineType[] lineTypes)
{
var control = new DwgLineTypeControlObject();
control.ByLayer = new DwgLineType(ByLayerName);
control.ByBlock = new DwgLineType(ByBlockName);
control.ByLayer = new DwgLineType(ByLayerName);
control.Continuous = new DwgLineType(ContinuousName) { Description = "Solid line" };
foreach (var lineType in lineTypes)
{
Expand Down

0 comments on commit a634063

Please sign in to comment.