Table: row height fixes for overlapping cells. Added code examples

This commit is contained in:
Marcin Ziąbek
2022-01-06 00:06:24 +01:00
parent 6e59fa6e3d
commit 01980e5635
8 changed files with 214 additions and 165 deletions
+21 -10
View File
@@ -15,30 +15,41 @@ namespace QuestPDF.Examples
{
RenderingTest
.Create()
.PageSize(175, 100)
.ProduceImages()
.ShowResults()
.Render(container =>
{
container
.Background(Colors.White)
.Background(Colors.Grey.Lighten2)
.Padding(25)
.Box()
.Layers(layers =>
{
layers.PrimaryLayer().Padding(10).Text("Sample text");
layers.Layer().Canvas((canvas, size) =>
{
using var paint = new SKPaint
DrawRoundedRectangle(Colors.White, false);
DrawRoundedRectangle(Colors.Blue.Darken2, true);
void DrawRoundedRectangle(string color, bool isStroke)
{
Color = SKColor.Parse(Colors.Black),
IsStroke = true,
StrokeWidth = 1,
IsAntialias = true
};
using var paint = new SKPaint
{
Color = SKColor.Parse(color),
IsStroke = isStroke,
StrokeWidth = 2,
IsAntialias = true
};
canvas.DrawRoundRect(0, 0, size.Width, size.Height, 20, 20, paint);
canvas.DrawRoundRect(0, 0, size.Width, size.Height, 20, 20, paint);
}
});
layers
.PrimaryLayer()
.PaddingVertical(10)
.PaddingHorizontal(20)
.Text("Sample text", TextStyle.Default.Size(16).Color(Colors.Blue.Darken2).SemiBold());
});
});
}