Skip to content

Commit

Permalink
Fixes a color bug introduced in 1.8.4.1
Browse files Browse the repository at this point in the history
- Fixed issue #291
  • Loading branch information
paulushub committed Aug 13, 2024
1 parent 9b5dc19 commit 1587145
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Source/SharpVectorCss/Css/CssPrimitiveColorValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public CssPrimitiveColorValue(int color, bool readOnly)
{
SetFloatValue(0);
}
else if (color > 0 && color <= 1)
else if (color > 0 && color < 1)
{
color = (int)(255 * color);
SetFloatValue(color);
Expand Down Expand Up @@ -58,7 +58,7 @@ protected override void OnSetCssText(string cssText)
{
color = 0;
}
else if (color > 0 && color <= 1)
else if (color > 0 && color < 1)
{
color = (int)(255 * color);
}
Expand Down
4 changes: 3 additions & 1 deletion Tests/SharpVectorsCore/Utils/PathUtilsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public sealed class PathUtilsTests
"net6.0"
#elif NET70
"net7.0"
#elif NET80
"net8.0"
#endif
;

Expand Down Expand Up @@ -119,7 +121,7 @@ public void GetAssemblyFileName()
}

private string CombineInternal(params string[] paths) =>
(string)_combineInternal.Invoke(null, new object[] { "", paths });
_combineInternal.Invoke(null, new object[] { "", paths }) as string;

private string GetAssemblyPathInternal(Assembly assembly) =>
(string)_getAssemblyPathInternal.Invoke(null, new object[] { assembly, "" });
Expand Down

0 comments on commit 1587145

Please sign in to comment.