RTL: text

This commit is contained in:
MarcinZiabek
2022-09-30 20:33:36 +02:00
parent af2229eabe
commit 9f6c091706
2 changed files with 68 additions and 21 deletions
+52
View File
@@ -205,6 +205,7 @@ namespace QuestPDF.Examples
.Grid(grid =>
{
grid.Spacing(25);
grid.AlignRight();
foreach (var i in Enumerable.Range(1, 6))
{
@@ -213,5 +214,56 @@ namespace QuestPDF.Examples
});
});
}
[Test]
public void Inlined()
{
RenderingTest
.Create()
.ProduceImages()
.PageSize(600, 800)
.ShowResults()
.Render(container =>
{
container
.Padding(25)
.Border(1)
.ContentFromRightToLeft()
.Inlined(inlined =>
{
inlined.Spacing(25);
foreach (var i in Enumerable.Range(5, 10))
{
inlined.Item().Background(Placeholders.BackgroundColor()).Height(25 + i * 5).Width(i * 25);
}
});
});
}
[Test]
public void Text()
{
RenderingTest
.Create()
.ProduceImages()
.PageSize(600, 600)
.ShowResults()
.Render(container =>
{
container
.Padding(25)
.MinimalBox()
.Border(1)
.ContentFromRightToLeft()
.Text(text =>
{
text.DefaultTextStyle(x => x.FontSize(32));
foreach (var i in Enumerable.Range(1, 100))
text.Span($"{i}").FontColor(Placeholders.Color()).BackgroundColor("#2000");
});
});
}
}
}