|
@@ -6,11 +6,10 @@ namespace QuestPDF.Fluent
|
|
|
{
|
|
{
|
|
|
public static class RotateExtensions
|
|
public static class RotateExtensions
|
|
|
{
|
|
{
|
|
|
- private static IContainer SimpleRotate(this IContainer element, Action<SimpleRotate> handler)
|
|
|
|
|
|
|
+ private static IContainer SimpleRotate(this IContainer element, int turnDirection)
|
|
|
{
|
|
{
|
|
|
var scale = element as SimpleRotate ?? new SimpleRotate();
|
|
var scale = element as SimpleRotate ?? new SimpleRotate();
|
|
|
- handler(scale);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ scale.TurnCount += turnDirection;
|
|
|
return element.Element(scale);
|
|
return element.Element(scale);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -23,7 +22,7 @@ namespace QuestPDF.Fluent
|
|
|
/// </remarks>
|
|
/// </remarks>
|
|
|
public static IContainer RotateLeft(this IContainer element)
|
|
public static IContainer RotateLeft(this IContainer element)
|
|
|
{
|
|
{
|
|
|
- return element.SimpleRotate(x => x.TurnCount--);
|
|
|
|
|
|
|
+ return element.SimpleRotate(-1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -35,7 +34,7 @@ namespace QuestPDF.Fluent
|
|
|
/// </remarks>
|
|
/// </remarks>
|
|
|
public static IContainer RotateRight(this IContainer element)
|
|
public static IContainer RotateRight(this IContainer element)
|
|
|
{
|
|
{
|
|
|
- return element.SimpleRotate(x => x.TurnCount++);
|
|
|
|
|
|
|
+ return element.SimpleRotate(1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|