Code cleanup

This commit is contained in:
MarcinZiabek
2021-04-20 12:54:38 +02:00
parent c3d805e5e5
commit 3dd8513e42
4 changed files with 8 additions and 3 deletions
+2 -1
View File
@@ -13,7 +13,7 @@ namespace QuestPDF.Elements
public string Color { get; set; } = Colors.Red.Medium;
public void Compose(IContainer container)
{
var backgroundColor = SKColor.Parse(Color).WithAlpha(75).ToString();
var backgroundColor = SKColor.Parse(Color).WithAlpha(50).ToString();
container
.Border(1)
@@ -26,6 +26,7 @@ namespace QuestPDF.Elements
layers
.Layer()
.ShowIf(!string.IsNullOrWhiteSpace(Text))
.AlignCenter()
.Box()
.Background(Colors.White)
.Padding(2)
-1
View File
@@ -1,7 +1,6 @@
using System;
using QuestPDF.Drawing.Exceptions;
using QuestPDF.Elements;
using QuestPDF.Helpers;
using QuestPDF.Infrastructure;
namespace QuestPDF.Fluent
+5 -1
View File
@@ -1,6 +1,5 @@
using System;
using System.Linq;
using QuestPDF.Drawing;
using QuestPDF.Infrastructure;
using SkiaSharp;
@@ -211,6 +210,11 @@ namespace QuestPDF.Helpers
var index = Random.Next(0, colors.Length);
return colors[index];
}
public static byte[] Image(int width, int height)
{
return Image(new Size(width, height));
}
public static byte[] Image(Size size)
{
+1
View File
@@ -27,6 +27,7 @@
<ItemGroup>
<EmbeddedResource Include="Resources\ImagePlaceholder.png" />
<EmbeddedResource Include="Resources\Logo.png" />
<None Remove="ImagePlaceholder.png" />
<None Include="Resources\Logo.png">
<Pack>true</Pack>