diff --git a/QuestPDF/Fluent/PaddingExtensions.cs b/QuestPDF/Fluent/PaddingExtensions.cs index 6f4b579..4cdc892 100644 --- a/QuestPDF/Fluent/PaddingExtensions.cs +++ b/QuestPDF/Fluent/PaddingExtensions.cs @@ -31,22 +31,22 @@ namespace QuestPDF.Fluent public static IContainer PaddingTop(this IContainer element, float value) { - return element.Padding(x => x.Top = value); + return element.Padding(x => x.Top += value); } public static IContainer PaddingBottom(this IContainer element, float value) { - return element.Padding(x => x.Bottom = value); + return element.Padding(x => x.Bottom += value); } public static IContainer PaddingLeft(this IContainer element, float value) { - return element.Padding(x => x.Left = value); + return element.Padding(x => x.Left += value); } public static IContainer PaddingRight(this IContainer element, float value) { - return element.Padding(x => x.Right = value); + return element.Padding(x => x.Right += value); } } } \ No newline at end of file diff --git a/QuestPDF/Fluent/ScaleExtensions.cs b/QuestPDF/Fluent/ScaleExtensions.cs index 58ae16a..eb8eb74 100644 --- a/QuestPDF/Fluent/ScaleExtensions.cs +++ b/QuestPDF/Fluent/ScaleExtensions.cs @@ -21,7 +21,7 @@ namespace QuestPDF.Fluent public static IContainer ScaleHorizontal(this IContainer element, float value) { - return element.Scale(x => x.ScaleX = value); + return element.Scale(x => x.ScaleX *= value); } public static IContainer FlipHorizontal(this IContainer element) @@ -31,7 +31,7 @@ namespace QuestPDF.Fluent public static IContainer ScaleVertical(this IContainer element, float value) { - return element.Scale(x => x.ScaleY = value); + return element.Scale(x => x.ScaleY *= value); } public static IContainer FlipVertical(this IContainer element) diff --git a/QuestPDF/Fluent/TranslateExtensions.cs b/QuestPDF/Fluent/TranslateExtensions.cs index 401eade..bb2c148 100644 --- a/QuestPDF/Fluent/TranslateExtensions.cs +++ b/QuestPDF/Fluent/TranslateExtensions.cs @@ -16,12 +16,12 @@ namespace QuestPDF.Fluent public static IContainer TranslateX(this IContainer element, float value) { - return element.Translate(x => x.TranslateX = value); + return element.Translate(x => x.TranslateX += value); } public static IContainer TranslateY(this IContainer element, float value) { - return element.Translate(x => x.TranslateY = value); + return element.Translate(x => x.TranslateY += value); } } } \ No newline at end of file diff --git a/QuestPDF/Resources/ReleaseNotes.txt b/QuestPDF/Resources/ReleaseNotes.txt index ad04a83..b6a838c 100644 --- a/QuestPDF/Resources/ReleaseNotes.txt +++ b/QuestPDF/Resources/ReleaseNotes.txt @@ -1,7 +1,2 @@ -Introduced new element: `Table` - a great way to construct complex document structures, e.g. reports. This element covers all cases offered by combination of the `Stack` and the `Row` elements. Additionally, it provides support for more complex layouts and corner cases. Updating to the `Table` element can greatly simplify your code 😁 - -Other changes: -- Added new element `DefaultTextStyle` - it allows set new text style to all its children, -- Improved the default paging behavior for the `Row` element. In some minor corner cases it might cause infinite layout exceptions and confuse developers. -- Improved the `Row` element: added new type of column that combines constant and relative widths. -- Fixed default page sizes for: Letter and Legal. +- Added a `ScaleToFit` element - scales it child down so it does fit in the provided space, +- Improved default Fluent configuration behavior for elements: Scale, Padding, Translate. \ No newline at end of file