-
-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature/Automatic row height calculation (#464)
* feat/Provides method for calculating lines required for a text Refactor the GetLinesQuantity method so that it supports all Maroto line wrapping strategies Provide a method to count the number of lines occupied by a text so that it is possible to calculate the height that the text occupies * feat/Control resizing reference through parameter Add a parameter to control whether internal resizing will reference only the available width or also the height. This will allow inner to use all available height Refactor math so that resizing is done in a separate method * feat/Provide method to query image dimensions Add method that loads the image into the PDF and returns its dimensions, this is necessary so that it is possible to calculate the height needed to add the image to the height * feat/Configure Maroto to calculate row height Configure Marado to calculate the height of the line when it is added Configure getHeight on row to save and return the height of your largest column Configure getHeight in col to return the height of the largest component * feat/Provide necessary height for rendering codes Implement methods to calculate the height required for codes * feat/Provide the height required to render an image * feat/Provide the height required to render a line * feat/Provide the height required to render a signature * feat/Provide the height required to render text * fix/Reset height only if row has automatic height Validate whether the row was created with automatic height before the row height remains. Reset row height whenever a new column is added * test/Update mocks * feat/Add method to generate line with automatic height * test/ Update tests Add text details to the structure file used by test * test/Update mocks * docs/Update examples * fix/Consider top margin when calculating line height * test/update testing framework Update test framework to validate updates to example pdfs * style/Make corrections highlighted by the lint
- Loading branch information
1 parent
6408f46
commit b02da4b
Showing
123 changed files
with
8,125 additions
and
1,273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
generate -> avg: 8.15ms, executions: [8.15ms] | ||
add_row -> avg: 895.60ns, executions: [2.03μs, 0.62μs, 0.69μs, 0.44μs, 0.69μs] | ||
file_size -> 16.01Kb | ||
generate -> avg: 6.84ms, executions: [6.84ms] | ||
add_row -> avg: 1122.20ns, executions: [2.65μs, 0.81μs, 0.80μs, 0.53μs, 0.82μs] | ||
file_size -> 16.54Kb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
generate -> avg: 2.42ms, executions: [2.42ms] | ||
add_row -> avg: 1197.50ns, executions: [2.60μs, 0.78μs, 0.77μs, 0.63μs] | ||
file_size -> 4.58Kb | ||
generate -> avg: 535.83μs, executions: [535.83μs] | ||
add_row -> avg: 819.00ns, executions: [1.95μs, 0.51μs, 0.49μs, 0.32μs] | ||
file_size -> 5.27Kb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
generate -> avg: 11.10ms, executions: [11.10ms] | ||
add_row -> avg: 606.00ns, executions: [1.52μs, 0.48μs, 0.49μs, 0.31μs, 0.54μs, 0.29μs] | ||
file_size -> 222.72Kb | ||
generate -> avg: 15.02ms, executions: [15.02ms] | ||
add_row -> avg: 938.83ns, executions: [2.50μs, 0.75μs, 0.77μs, 0.47μs, 0.71μs, 0.42μs] | ||
file_size -> 224.21Kb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
generate -> avg: 948.67μs, executions: [948.67μs] | ||
add_row -> avg: 845.40ns, executions: [1.72μs, 0.71μs, 0.60μs, 0.46μs, 0.73μs] | ||
file_size -> 2.48Kb | ||
generate -> avg: 827.33μs, executions: [827.33μs] | ||
add_row -> avg: 887.00ns, executions: [2.02μs, 0.65μs, 0.66μs, 0.43μs, 0.67μs] | ||
file_size -> 2.89Kb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
generate -> avg: 6.85ms, executions: [6.85ms] | ||
add_row -> avg: 881.50ns, executions: [1.91μs, 0.62μs, 0.58μs, 0.41μs] | ||
file_size -> 4.65Kb | ||
generate -> avg: 432.17μs, executions: [432.17μs] | ||
add_row -> avg: 1224.75ns, executions: [2.75μs, 0.89μs, 0.77μs, 0.48μs] | ||
file_size -> 5.34Kb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
generate -> avg: 8.37ms, executions: [8.37ms] | ||
add_row -> avg: 665.00ns, executions: [1.13μs, 0.43μs, 0.43μs] | ||
file_size -> 4.99Kb | ||
generate -> avg: 13.45ms, executions: [13.45ms] | ||
add_row -> avg: 1295.67ns, executions: [2.56μs, 0.72μs, 0.60μs] | ||
file_size -> 6.27Kb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
generate -> avg: 16.01ms, executions: [16.01ms] | ||
add_row -> avg: 755.00ns, executions: [1.49μs, 0.51μs, 0.37μs, 0.35μs, 0.33μs, 1.49μs] | ||
add_rows -> avg: 261.67ns, executions: [323.00ns, 322.00ns, 143.00ns, 364.00ns, 144.00ns, 274.00ns] | ||
file_size -> 16.45Kb | ||
generate -> avg: 35.46ms, executions: [35.46ms] | ||
add_row -> avg: 1743.00ns, executions: [4.08μs, 1.14μs, 0.74μs, 0.68μs, 0.70μs, 3.12μs] | ||
add_rows -> avg: 485.83ns, executions: [641.00ns, 561.00ns, 280.00ns, 621.00ns, 211.00ns, 601.00ns] | ||
file_size -> 28.15Kb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.