| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using Microcharts;
- using NUnit.Framework;
- using QuestPDF.Examples.Engine;
- using QuestPDF.Fluent;
- using QuestPDF.Helpers;
- using QuestPDF.Infrastructure;
- using SkiaSharp;
- namespace QuestPDF.Examples
- {
- public class CanvasExamples
- {
- [Test]
- public void BorderRadius()
- {
- RenderingTest
- .Create()
- .ProduceImages()
- .ShowResults()
- .Render(container =>
- {
- container
- .Background(Colors.White)
- .Padding(25)
- .Box()
- .Layers(layers =>
- {
- layers.PrimaryLayer().Padding(10).Text("Sample text");
-
- layers.Layer().Canvas((canvas, size) =>
- {
- using var paint = new SKPaint
- {
- Color = SKColor.Parse(Colors.Black),
- IsStroke = true,
- StrokeWidth = 1,
- IsAntialias = true
- };
-
- canvas.DrawRoundRect(0, 0, size.Width, size.Height, 20, 20, paint);
- });
- });
- });
- }
- }
- }
|