many debugs
All checks were successful
Publish NuGet packages / publish (push) Successful in 28s

This commit is contained in:
melekhin
2026-06-19 15:06:40 +07:00
parent 08b39b7bfe
commit e373d4108a
24 changed files with 1569 additions and 632 deletions

View File

@@ -6,15 +6,13 @@
public readonly struct CellFill : IEquatable<CellFill>
{
/// <summary>Цвет фона.</summary>
public ExColor? BackgroundColor { get; init; }
public System.Drawing.Color? BackgroundColor { get; init; }
/// <summary>Создаёт элемент Fill для Open XML.</summary>
public Fill? ToFill()
{
if (!BackgroundColor.HasValue || !BackgroundColor.Value.Color.HasValue)
return null;
if (BackgroundColor is not { } c) return null;
var c = BackgroundColor.Value.Color.Value;
var fill = new Fill
{
PatternFill = new PatternFill
@@ -37,7 +35,7 @@ public readonly struct CellFill : IEquatable<CellFill>
Convert.ToByte(rgb.Substring(2, 2), 16),
Convert.ToByte(rgb.Substring(4, 2), 16)
);
return new CellFill { BackgroundColor = new ExColor(color) };
return new CellFill { BackgroundColor = color };
}
public override bool Equals(object? obj) => obj is CellFill other && Equals(other);