Skip to content

Commit

Permalink
Improved layout stability
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcinZiabek committed Feb 6, 2024
1 parent 1181d90 commit 90541d4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/QuestPDF/Elements/Padding.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal override SpacePlan Measure(Size availableSpace)

var internalSpace = InternalSpace(availableSpace);

if (internalSpace.Width < 0 || internalSpace.Height < 0)
if (internalSpace.Width < -Size.Epsilon || internalSpace.Height < -Size.Epsilon)
return SpacePlan.Wrap();

var measure = base.Measure(internalSpace);
Expand Down
2 changes: 1 addition & 1 deletion Source/QuestPDF/Helpers/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ internal static void VisitChildren(this Element? element, Action<Element?> handl

internal static bool IsNegative(this Size size)
{
return size.Width < 0f || size.Height < 0f;
return size.Width < -Size.Epsilon || size.Height < -Size.Epsilon;
}

internal static SKEncodedImageFormat ToSkImageFormat(this ImageFormat format)
Expand Down
1 change: 1 addition & 0 deletions Source/QuestPDF/Resources/ReleaseNotes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ Version 2023.12.4

Version 2023.12.5
- Improvement: when drawing content with the Canvas element, the library clips drawn content to the element's boundaries, preventing potential overflow when integrating with other libraries.
- Improved layout stability.

0 comments on commit 90541d4

Please sign in to comment.