Code cleanup
This commit is contained in:
@@ -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,7 +1,6 @@
|
||||
using System;
|
||||
using QuestPDF.Drawing.Exceptions;
|
||||
using QuestPDF.Elements;
|
||||
using QuestPDF.Helpers;
|
||||
using QuestPDF.Infrastructure;
|
||||
|
||||
namespace QuestPDF.Fluent
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user