From cd422ec492c263452fb61a406332244cae55c415 Mon Sep 17 00:00:00 2001 From: blanchardglen <139526410+blanchardglen@users.noreply.github.com> Date: Tue, 1 Oct 2024 05:19:58 +1000 Subject: [PATCH] feature/Bottom padding for text in automatic row calculation (#478) Co-authored-by: Glen Blanchard --- Makefile | 1 + docs/assets/examples/autorow/v2/main.go | 9 +++ docs/assets/pdf/addpagev2.pdf | Bin 5644 -> 5644 bytes docs/assets/pdf/autorow.pdf | Bin 219467 -> 221069 bytes docs/assets/pdf/backgroundv2.pdf | Bin 897395 -> 897395 bytes docs/assets/pdf/barcodegridv2.pdf | Bin 16543 -> 16543 bytes docs/assets/pdf/billingv2.pdf | Bin 231690 -> 231690 bytes docs/assets/pdf/cellstylev2.pdf | Bin 28599 -> 28599 bytes docs/assets/pdf/compressionv2.pdf | Bin 224688 -> 224688 bytes docs/assets/pdf/customdimensionsv2.pdf | Bin 205235 -> 205235 bytes docs/assets/pdf/customfontv2.pdf | Bin 286871 -> 286871 bytes docs/assets/pdf/custompagev2.pdf | Bin 205158 -> 205158 bytes docs/assets/pdf/datamatrixgridv2.pdf | Bin 5268 -> 5268 bytes docs/assets/pdf/disablepagebreakv2.pdf | Bin 806502 -> 806502 bytes docs/assets/pdf/footerv2.pdf | Bin 14762 -> 14762 bytes docs/assets/pdf/headerv2.pdf | Bin 14754 -> 14754 bytes docs/assets/pdf/imagegridv2.pdf | Bin 224213 -> 224213 bytes docs/assets/pdf/linegridv2.pdf | Bin 2893 -> 2893 bytes docs/assets/pdf/listv2.pdf | Bin 48850 -> 48850 bytes docs/assets/pdf/lowmemoryv2.pdf | Bin 2522 -> 2518 bytes docs/assets/pdf/marginsv2.pdf | Bin 256738 -> 256738 bytes docs/assets/pdf/maxgridsumv2.pdf | Bin 8126 -> 8126 bytes docs/assets/pdf/mergepdfv2.pdf | Bin 280849 -> 280849 bytes docs/assets/pdf/metadatasv2.pdf | Bin 1316 -> 1316 bytes docs/assets/pdf/orientationv2.pdf | Bin 1291 -> 1291 bytes docs/assets/pdf/pagenumberv2.pdf | Bin 5717 -> 5717 bytes docs/assets/pdf/parallelismv2.pdf | Bin 2519 -> 2518 bytes docs/assets/pdf/protectionv2.pdf | Bin 1415 -> 1415 bytes docs/assets/pdf/qrgridv2.pdf | Bin 5337 -> 5337 bytes docs/assets/pdf/signaturegridv2.pdf | Bin 6274 -> 6274 bytes docs/assets/pdf/simplestv2.pdf | Bin 209774 -> 209774 bytes docs/assets/pdf/textgridv2.pdf | Bin 30684 -> 30684 bytes docs/assets/text/addpagev2.txt | 4 +- docs/assets/text/autorow.txt | 4 +- docs/assets/text/backgroundv2.txt | 4 +- docs/assets/text/barcodegridv2.txt | 4 +- docs/assets/text/billingv2.txt | 10 ++-- docs/assets/text/cellstylev2.txt | 4 +- docs/assets/text/compressionv2.txt | 4 +- docs/assets/text/customdimensionsv2.txt | 4 +- docs/assets/text/customfontv2.txt | 6 +- docs/assets/text/custompagev2.txt | 4 +- docs/assets/text/datamatrixgridv2.txt | 4 +- docs/assets/text/disablepagebreakv2.txt | 4 +- docs/assets/text/footerv2.txt | 6 +- docs/assets/text/headerv2.txt | 6 +- docs/assets/text/imagegridv2.txt | 4 +- docs/assets/text/linegridv2.txt | 4 +- docs/assets/text/listv2.txt | 4 +- docs/assets/text/lowmemoryv2.txt | 4 +- docs/assets/text/marginsv2.txt | 6 +- docs/assets/text/maxgridsumv2.txt | 6 +- docs/assets/text/mergepdfv2.txt | 6 +- docs/assets/text/metadatasv2.txt | 4 +- docs/assets/text/orientationv2.txt | 4 +- docs/assets/text/pagenumberv2.txt | 4 +- docs/assets/text/parallelismv2.txt | 4 +- docs/assets/text/protectionv2.txt | 4 +- docs/assets/text/qrgridv2.txt | 4 +- docs/assets/text/signaturegridv2.txt | 4 +- docs/assets/text/textgridv2.txt | 6 +- internal/fixture/fixture.go | 1 + pkg/components/text/text.go | 2 +- pkg/props/text.go | 9 +++ .../texts/new_text_auto_row_custom_prop.json | 1 + .../texts/new_text_col_custom_prop.json | 1 + .../texts/new_text_custom_prop.json | 1 + .../texts/new_text_row_custom_prop.json | 1 + test/maroto/examples/autorow.json | 55 +++++++++++++++++- 69 files changed, 147 insertions(+), 70 deletions(-) diff --git a/Makefile b/Makefile index 0a9b5152..90fe1b1a 100644 --- a/Makefile +++ b/Makefile @@ -51,6 +51,7 @@ mocks: .PHONY: examples examples: go run docs/assets/examples/addpage/v2/main.go + go run docs/assets/examples/autorow/v2/main.go go run docs/assets/examples/background/v2/main.go go run docs/assets/examples/barcodegrid/v2/main.go go run docs/assets/examples/billing/v2/main.go diff --git a/docs/assets/examples/autorow/v2/main.go b/docs/assets/examples/autorow/v2/main.go index 066d61d6..25ff4aa5 100644 --- a/docs/assets/examples/autorow/v2/main.go +++ b/docs/assets/examples/autorow/v2/main.go @@ -53,6 +53,15 @@ func GetMaroto() core.Maroto { }), ) + m.AddAutoRow( + image.NewFromFileCol(5, "docs/assets/images/biplane.jpg"), + text.NewCol(7, intro, props.Text{ + Size: 13, + Top: 8, + Bottom: 9, + }), + ) + m.AddAutoRow( code.NewBarCol(4, "code"), text.NewCol(8, intro), diff --git a/docs/assets/pdf/addpagev2.pdf b/docs/assets/pdf/addpagev2.pdf index 40434ac46c7177decd3b0616dee6662404299095..88eac50a60f6c1d888b3a6eba16bdd928e9b99ae 100644 GIT binary patch delta 50 ycmeCt>CxFBD57d2OlB%HLVr67tWMTl9+iWIsjS&DvOboFA delta 50 xcmeCt>CxFBD57d%U}$7uWMO2e$))d`pW>2OlB%HLVg(d4F@Vc$HWRtV2mnFm42=K) diff --git a/docs/assets/pdf/autorow.pdf b/docs/assets/pdf/autorow.pdf index 6e3b57a24a827b79708b5f30c2955c70fa74c979..27cfc47bcb7929cc05c3ca12d059e5fcd143a55f 100755 GIT binary patch delta 2035 zcmb7Fdr(wW7~kcxH@yoi3$8pwxxAF;?m73|rxIvr#A|#nD85)&d>|mWI!vaUB2s1| zoXO2G^PSqnB$_&AqG^hXT8Wd1(o}yqrfH()D}~No1YiHuo!ztgY7@3AxzB~=~jqlz zl{6>1Ynb3yspo`eH5dj3)%nNL>Wl;#1An>(U8o83fDY~uV(cXarM6j&`cr);CR#G>CDR=DO)(x($PWK{H zMgl8CWEOZlIau))CD|-1lE}L`Q%X4F=jIF)Il`rG%U^@f;&RV)d@4K;`-WudC9-;f z@0w7YE(Wg(nNLfyJE&Lxtsatu&(f**bYy=VFo0N-C3Ra54d{p8AFz~`1h=(+=oSx& z$8o)f;YXo`w1nJfP0%RpWEgyyCC=P)&cOk+TCf5zA10&=gc1-TSyXGcq}iY?Uo1c< zU$jfSY*&CN6XqjX$rJMwn^3^#=OdeB=h&_Wp=^ebeHw0e*cn9p2aLw?p(gxIR3}1B0QaZ21!E)F$ zItD+8H{zt|k(DQ5^+~8DUypq!A*Bz+(FxgFVfVWU3q73UAII%&J%0Vjxrt5NQ%&EM zPZ}01oNs7N*`E9Lk@hO9O?Rxh(dPLVGv`G6);nANXg%)Q@bDhIJk+nXm$fMOSf!y+ zSUF_>?2A9qcg9r}+JZ;?-2QOr!K~1nb9XD^zx=zParyk!#rdh=*xqXy!aT3K&u4&#ln9o5NIQ}17C?$p#?r7TC1;#%+{5aB%VpwMyXJ-=&( zEh!D>ersuLnzi%v`q?Sda!)T2Ng--Trh`{oInAx@}e4$WFnc5`gFSh$SDB6iYYJI zagZG5SJFuWKri}oP$st!3kE))gd=|m3ORc(VIojm4|Avxk!LJpN=qFqB#vZxmb8+> eQWkREo1E*&D|b|s+Y1>INCFZQ6*Xeyo6NtlMRm&n delta 2092 zcma)7eNy%vuvQb2X5atvDdFmpirx{i}PNtTEMQ96%#2A** z@jN^h(2Ft*1FbUzNVs`I^-K@g_v~tnp%wL_zy=qFf|y4HBy}3-J#V#|0h1bHgP90{ ztsWYfp$mb%nicSpt0&wQgrN+{z$VYgdUp-nM6AYWQ3=#Syp7R<0+Z(-z-V59gY)-e zG^fC-ptmsES(7e!;cu{Jfw+p2>jo4h(1giK=o85-Aev~wY_XVgNDIZv)q@;?q(zDs zcv0j*HU&5a@I+hzVZZ@L=|quu9C^037p0$I>kCnD9@YU*SQCP&X@#|u+dFQdFf-5x zz8~%b?=6&xP)eQAi;k%2DJ?jz34`}^dblz~HX#+0#*k)=a?*|qm7$aNVCZ3ta?-8} zS_^l27hRGC;e&+aEd5~Y*Pbv5;|iI`+GwVAYp(} z)E@%<9EA)=u(Y6K1tOfMbsPtWKs26?>thSH*@_7Oqo`073v;MU6(=n#_&p_M2a7cG_YUN>UyXe*ti8OP+^;$@8FYJEfhgh{A zZ}rBuFR;_`JspNFO(mOeylV|V)UPWzIhHVSu`M|;xH?s7#ZMo-7wWnsgjM(v0pVUruKuXO!I*zFSKDyh`kp=TzomPkm{Jc5kEM;F`R_kf4EXcMn-x2hV^0@JiWWIa}7YtmTt$bZxiK`wj5WGjQXml=R^KmDhuoc<%dXqIT}h)0Suty1((31G(WkT=58R zyfdMG&w&i&UmN+dJka;o*M9hS3IDHPuVs}BsKgoh0cTFOxz~&aTZ*pj-hG0e``!HP zJFydf7tT455wHH3q4AjUExV#le7bbWKWtL-Ml{I2{(PXWFN`_e8n!JwB}uTi@7@>j z_RzK9QyQ*&d&=?+VEwJ`BSn~h8q)3)X#alAXvi!64&?Yp$0n*%e~e0YAVJ+t4y5Rp zi365*J)1_#7XK%FO=?+S^5UL#HTRc&kp8!$8qHr!iG80YEXd*xNEu0OsuB>)w*4IA zYrj+ytCeTQTp#~)LPggtap21_{DK2%PWkwfbArDO@YSJGq?D5;OQX_IN-8y? zI*Ck22^EkG>1Yfskbna6DrQ1)eR6?0F00r=gv3QqB*l9ce+ zS4B%<8R#>a4Usq5dZ$mk$(qdaq0U@vX d$sd{O*5a(9;?g2Z4o(3PP%N(1u2>U~{|`DR;spQz diff --git a/docs/assets/pdf/backgroundv2.pdf b/docs/assets/pdf/backgroundv2.pdf index a151a28db25d95f65ba5c4e1fac9144cccdf675b..380c560483c35b23901970d1d28c919de0b6c996 100644 GIT binary patch delta 99 zcmezT$n5hYvxXMN7N!>F7M2#)7Pc1l7LFFq7OocV7M?A|x8APfKi delta 94 zcmezT$n5hYvxXMN7N!>F7M2#)7Pc1l7LFFq7OocV7M?A6Z^NPR$&(|@CbLB7Pd*-QJ2^8#YqDO1b@R!H_LC8eK+LrLWCXLZE~Dx6 zzpcy$jAqmI+JKb#^!PUBYpRw;<^~o9mPQ7eT>8HGDK3d6sR|k{Rz?O!CO}cB-1Mk+ d<{x541_}lsppd7)1!fo-nHgD3&*)%Y1OOGyD+T}n delta 138 zcmeC0#Md>6Z^NPR$x0DUlYfNkPo5lMHaR6iYx1FRv*wc#?I$A`ftYFg$p~g+T}Jci ze_NRi7)__^wE-!!>G5sM*HkSG42=woER2jbx%7SWQ(O{DQWZ2@tbk%B25`CQQSHn> b#Egv;3_w63Pk{@}FfuYTHlCi*!Mq3nbwex6 diff --git a/docs/assets/pdf/cellstylev2.pdf b/docs/assets/pdf/cellstylev2.pdf index 59ddb628636df73c68e702ffb6447177276b4650..ee1d4428bd2b5a58b7750418bbb66362f2cafe00 100644 GIT binary patch delta 52 zcmdmfpK<$r#tr9lRV|Io4J-^SjSMxp^nLSFToOxC6*OF|j0}uSfTB>j&0lg4GXen7 C_z;2s delta 52 zcmdmfpK<$r#tr9lRV@q*jSP$|jEpt8^nLSFToOxC6*OF|fMO;FaJkK2at|{C0MCFB AY5)KL diff --git a/docs/assets/pdf/compressionv2.pdf b/docs/assets/pdf/compressionv2.pdf index 112a79f0607a3a0a10401ce8434f42e89bad7948..092560c7de3732884fa777a2cc03a263b25079ad 100644 GIT binary patch delta 277 zcmdmRn|A{conW4)m%eX)ic4Zis)B}#m63sw2~ZR&H~mI7^G~3WmvWd@?TyWh6bwK> kAy0t|%rG!EvH)6yEM{b2W?^oLCT3)0U}`?yESI?o0J-@})Bpeg delta 279 zcmdmRn|A{conW4<%VIW}nMG^z31;ib$t(ujXC*W9vrV?*G}t_uWjV{_8$5=avpI8_ zr^{FHU?%m&*7G?*o=r?1Rp&Sf;6E}q3~AY!Iqpb*4m zXUC-<;h&V1np~n_V>5kk7PAhMp~3W5SH#+GJ==wc=o7C=jp)fpLBn3!8mH_K(N0szfWNS6Qr diff --git a/docs/assets/pdf/customdimensionsv2.pdf b/docs/assets/pdf/customdimensionsv2.pdf index fd6c0476eaaa24c82ec759e513790a602de3ffff..2bfcdf23239ec056ab822eef1c7b0c46b83d240f 100644 GIT binary patch delta 59 zcmdmdm}m20o`x327N#xC@(QY!M&=bcMkYW}sN8lJ I1?GH401EsMr2qf` delta 59 zcmdmdm}m20o`x327N#xC@(QXJ28KokMixfKnq2z6`6(`mC8-J;E>=J>69c&1b{7Ta Gd`18WLJx}o diff --git a/docs/assets/pdf/customfontv2.pdf b/docs/assets/pdf/customfontv2.pdf index fdeb9a803ef19475081523d70e32c698b95a9d54..e3f52494d7678f1830ee5e3c0bd4dee332a4bde8 100644 GIT binary patch delta 78 zcmbP!P;mM|!G;#b7N!>FEi5|Gla)ENr|*hp$(*hg&5}G_Iff-)+0w||z{0@N$V8J% e-#0(SC9xz`LBqw$$iT=1C<>O_zBPvB5iFEi5|G(+@?nBu-Z3(48J0&5}7?Iff-)*}}lk$iT?L$V8J% c-#0(SC9xz`LBqugC}v^+mD|2GhUF160MQi}CjbBd diff --git a/docs/assets/pdf/custompagev2.pdf b/docs/assets/pdf/custompagev2.pdf index f1e703299b6dadff5250fde12014c31ef04a484b..92cb65d409fb78a8cd4cb092d659a3c8299279fc 100644 GIT binary patch delta 57 zcmaEMi09cMo`x327N#xCm*kZ#jm!-!3@nXIG`aMB^HW?BOHvgyT&#=?j7)%{V7cvI I<(Uf^0VGrr2><{9 delta 57 zcmaEMi09cMo`x327N#xCm*kZ#3=EA7j4X^yG`aMB^HW?BOHvgyT&#d%CI(Qs?O)}Y G3mE|+s1WS{ diff --git a/docs/assets/pdf/datamatrixgridv2.pdf b/docs/assets/pdf/datamatrixgridv2.pdf index fa3930f93f321c1ab503235ad7f7fa074fac2065..b7a0f0b6198b47d1e015709265cf647dbf054fcd 100644 GIT binary patch delta 50 zcmbQDIYn~=ld!6#k-33|fu)hDCYQc%eu_(CNveW|iF7M2#)7Pc1l7LFFq7OocVEj)XCR4t9n4J-^Sjm$K;^nLSF aToOxC6*OF|j0}uSfTB>j?GJr;S{VVp%oeNw delta 77 zcmaDh$MD%4!-f{d7N!>F7M2#)7Pc1l7LFFq7OocVEj)XCR4oh)jSP$|j7&AT^nLSF YToOxC6*OF|fMO;FaJlUdeRx_K0lU5yjsO4v diff --git a/docs/assets/pdf/footerv2.pdf b/docs/assets/pdf/footerv2.pdf index 4c1d12427cbc09a2492b126f8a413075efef5e55..0d85f70cf77cb47d9fec6181a4064769341d55c4 100644 GIT binary patch delta 87 zcmZ2gysCJEklEy7GwaD7X4;d5%*-aQGs|T%G?*-7Zop_c+0VR0)zZk^z`_7XYI5oO k=BKzMmZU0ZxL6q(7@2@XA#$6ao4YeITN)TnHngk+0Gg5*;Q#;t delta 87 zcmZ2gysCJEklEx4GqcIQX4;d5%&aG`Gs|VPoGfc@z+`AJ+0VR0)xyBg$iT?L$W)U{ j-#0(SC9xz`LBqugC}v^+m)rc@+?|ox!qRNAp=Biinll*L diff --git a/docs/assets/pdf/headerv2.pdf b/docs/assets/pdf/headerv2.pdf index 90d6b253ebc1450ec8c35508070cce1ef95dcb43..19bdbae8944ec0b59adb402fb17872386fb64e36 100644 GIT binary patch delta 50 ycmZ2fyr_7?E^}2&BXa`_10bo%rSF@c;*waBs-WRwWn^Gv0uqJDZN6`Qm=OSvN)Ge@ delta 50 xcmZ2fyr_7?E^}2214APNBMT!_O)h=k{1lhOl2io^7b~Eci2+=0^L_Kfi~x)>4%7eu diff --git a/docs/assets/pdf/imagegridv2.pdf b/docs/assets/pdf/imagegridv2.pdf index 9b69427f9b517c076bb1a6f4b5a5188c6795e4aa..b44fe496c9412cca5397bdb58a5034b24919a720 100644 GIT binary patch delta 240 zcmcb5o%iZ>-VH~1n|VFkc|93{m}xt&C$qTpC6VxnNpbzr#}P=fJKqGU@-VH~1w{vSUOIlCAt-);2e1y0C2rnZLGi^V@%PcNET_uHi?R23GWrc2;b|c}`VJBXa`_150BAO)h=k{1lhOl2io^7b_zJBNGF-+~zNwk&FO#u?^?| delta 50 xcmX>rc2;b|c}`Ue14APNBMT!lO)h=k{1lhOl2io^7b~Eci2+=0^B2xYMgVlL4b}hv diff --git a/docs/assets/pdf/listv2.pdf b/docs/assets/pdf/listv2.pdf index 2d7cdf6c86de5304651f6434f78625d50d096f39..e0bb6f10bdef73bc4adec5fdf7802310468c633a 100644 GIT binary patch delta 52 zcmccgm+8`9rVYY-RV|Io4J-^SjSV%q^nLSFToOxC6*OF|j0}uS4B&E`E%wf01OU?} B5BC57 delta 52 zcmccgm+8`9rVYY-RV@q*jSP$|jLbB-^nLSFToOxC6*OF|fMO;FaJkJEduK5M0MPso A;{X5v diff --git a/docs/assets/pdf/lowmemoryv2.pdf b/docs/assets/pdf/lowmemoryv2.pdf index e43cf02d80700885d82b7318ca1277f3aaa7758d..056fe55c7b1c5d8f11501511bc13dc931dc57f09 100755 GIT binary patch delta 385 zcmca5d`)-*AB(Srf`LMQQWlqujlOe!UP)?RNwI<@P%KD4Ah8I@Q!q3J^MX=~^Gl18 zQ;QW0O~3*nl?AClHR-8#c3i1>DIhZ}H^;GjW@I#(yp5@!$2o^I`NJA1cn!Jlct=<&qOAtUPH#7tJ z3r)=bY-VTY=jyol3)!+=Xw)z#mP3jis5VW$89 delta 367 zcmca6d`ox(A4`Ctk%ECjeo_{fjg7u@eqKpxUP-Znp)pV}NIxL42*_11GywC0Qj7CT zi;`1;(uQDxkjjEopqlhlJ3Fq_ycCcjhQ<@usBUgxImgIoIN6_V0;9p?2W;X@hDMWr zuvGv#h3uBP76yh!21XV}=DG&P>IMetn)<%^DK3d6sTwX;KnW8AWCfG2v)eJ6OcvuP zXEdGM$DzVvU|?W5`4fklm>JL!AfS+^zy)R)7@8THO($QR@iX$E zkCo@|^57z0c0rue0yxKy@zz=Fv3g%ali5+SC+&}$b= tM+}NB%zYQkEtbl*Wnm8^kD0{q49~Rbn&p)#V~m)LWntzd2tRN^<}V@*0b>9F delta 877 zcma)4O=uHA6lQlvk+indM6EXH1eCUvn)%z!rj|6)w7XD*(t{ByLXzD;JtU<`PxhuD zUX*l^2lnD2=)sGULoSLJui`~7HKGOYo|{s1W(~z#^I+b-H}k&tzWHVw+arzbkvDr( zr#8Ip7|{evVS-nZ%Y_ZUQpeN`vlYKq-P|boHOvW+t}&{!REx64pw3C~F>_yMW^iN9 z)6&7qIdXz3Oz_#7I!VK3!4om1GZLh;$rukCW~4>@idQY(i%95J_KwcY)^66muIhHP zEa>ixw(f4NU50~wV<7mIooID;o+FJO9sYRX8ahqM{Mv(j^HIL3$)&gRO=D;b>>N4` z?>ojREc&_)7wtbC<69h_c8r8(^_1X!VHsE0gSgJQ!o_fS{bL2>v^VnVd4x3z4S`|_ zZuK*=eb_O+$6;L{th3&;(R3fk3tGDUQ=t4XxLsqA%~v<&6I;opHLtcxZPfsC7Jg_* z1oKb=OhXkhvxCRrSy)%;YZX0I?$AMJU{yvYA%saf(kL$Dhzgj=sV#L@ zhAaQ}RLmrMX|fLX95e=3TofIW3~eEQL}j=F)I}Eo9CQx$7v;ov$}PEa;ul5W)uQC% vIMRJkEb1=0G|vU~O1@dJe80%7Qo5Wf@8bgL+e%dBc?WNu(#U}2OlB%HLVr67tWMTl9+q{W6k`Vw*Aq>a> delta 50 xcmeC?>gL+e%dBc)U}$7uWMO2f$))d`pW>2OlB%HLVg(d4F@Vc$-ozZq2mnc^46pzI diff --git a/docs/assets/pdf/pagenumberv2.pdf b/docs/assets/pdf/pagenumberv2.pdf index 8fd4de0a241a49ca5cfceedb07e047237304fb3e..759ef6ca155c3650d1d4992d55ec4fa687476886 100644 GIT binary patch delta 50 ycmcbrb5&=DIhZ}H^;JkW@I#(9LUzsWN1A3A)7d(#pGXX3`{n0%exj?s9s z7)Lpy(d0f3mB~z;Vj^Zh7l435o&pz`VPI%Bc>#xJy(zl5fq|h3SjREi6q_ Z>=d9%q;RX5Jde|W!;ni=)z#mP3jkL2Vc-A& diff --git a/docs/assets/pdf/protectionv2.pdf b/docs/assets/pdf/protectionv2.pdf index a243b3371b14907897f0c3867bbcc757686f15db..c3f7e262c574812eb9c34623ea18b3690c6abca4 100644 GIT binary patch delta 49 zcmZqYZs*=`n_17Y&LnJi1y?J5thkw zfNW0DTs8{@1BD>2$%0JUY?csa9ExTD28?Etxx@?@%_m!nm8e)6nHyLbSeh7U za_Rf#r?@1Rq$+5*SQ!}@nHa$2CSMl&C1R#v00Ihm3S3}@fvJJT=bcMkWSux$UbA InU63608LvFrT_o{ delta 59 zcmaF&jOX1mo`x327N#xCt%j-=28KokMi#~fnq2z6`6(`mC8-J;E>=J>69c&1_Em<= GM;HN0ArXcE diff --git a/docs/assets/pdf/textgridv2.pdf b/docs/assets/pdf/textgridv2.pdf index 243bebd95465004b8852e6c6579fdeae2e98c3d9..e92373b74865b83c7670c02d7f4340eb887e888b 100644 GIT binary patch delta 52 zcmccfp7G9m#tp`0s+LCP1{MaECPtcE`o8%oE{P?n3K}j}Mg~SE25`B}5oIlm0LqFF AjQ{`u delta 52 zcmccfp7G9m#tp`0suo6uhUP{VCYG99`o8%oE{P?n3K}j}Mg~SE25`B}5oIlm0Lo+! Aj{pDw diff --git a/docs/assets/text/addpagev2.txt b/docs/assets/text/addpagev2.txt index 42491058..53b0710c 100644 --- a/docs/assets/text/addpagev2.txt +++ b/docs/assets/text/addpagev2.txt @@ -1,3 +1,3 @@ -generate -> avg: 2.53ms, executions: [2.53ms] -add_page -> avg: 1589.00ns, executions: [1.59μs] +generate -> avg: 3.18ms, executions: [3.18ms] +add_page -> avg: 2696.00ns, executions: [2.70μs] file_size -> 5.64Kb diff --git a/docs/assets/text/autorow.txt b/docs/assets/text/autorow.txt index 62d03d16..73be30b7 100644 --- a/docs/assets/text/autorow.txt +++ b/docs/assets/text/autorow.txt @@ -1,2 +1,2 @@ -generate -> avg: 2.94ms, executions: [2.94ms] -file_size -> 219.47Kb +generate -> avg: 3.21ms, executions: [3.21ms] +file_size -> 221.07Kb diff --git a/docs/assets/text/backgroundv2.txt b/docs/assets/text/backgroundv2.txt index bbb76c2b..fdc57aad 100644 --- a/docs/assets/text/backgroundv2.txt +++ b/docs/assets/text/backgroundv2.txt @@ -1,3 +1,3 @@ -generate -> avg: 566.80ms, executions: [566.80ms] -add_page -> avg: 7133.00ns, executions: [7.13μs] +generate -> avg: 645.27ms, executions: [645.27ms] +add_page -> avg: 5223.00ns, executions: [5.22μs] file_size -> 897.39Kb diff --git a/docs/assets/text/barcodegridv2.txt b/docs/assets/text/barcodegridv2.txt index 53211576..d298a09a 100644 --- a/docs/assets/text/barcodegridv2.txt +++ b/docs/assets/text/barcodegridv2.txt @@ -1,3 +1,3 @@ -generate -> avg: 2.84ms, executions: [2.84ms] -add_row -> avg: 404.80ns, executions: [1.03μs, 0.36μs, 0.23μs, 0.17μs, 0.23μs] +generate -> avg: 1.37ms, executions: [1.37ms] +add_row -> avg: 358.60ns, executions: [1.16μs, 0.17μs, 0.15μs, 0.10μs, 0.22μs] file_size -> 16.54Kb diff --git a/docs/assets/text/billingv2.txt b/docs/assets/text/billingv2.txt index 87abed8b..55a976e2 100644 --- a/docs/assets/text/billingv2.txt +++ b/docs/assets/text/billingv2.txt @@ -1,6 +1,6 @@ -generate -> avg: 24.86ms, executions: [24.86ms] -header -> avg: 1.01μs, executions: [1.01μs] -footer -> avg: 94.00ns, executions: [94.00ns] -add_row -> avg: 239.00ns, executions: [189.00ns, 289.00ns] -add_rows -> avg: 785.00ns, executions: [0.21μs, 1.36μs] +generate -> avg: 25.70ms, executions: [25.70ms] +header -> avg: 1.78μs, executions: [1.78μs] +footer -> avg: 125.00ns, executions: [125.00ns] +add_row -> avg: 255.50ns, executions: [202.00ns, 309.00ns] +add_rows -> avg: 916.50ns, executions: [0.24μs, 1.59μs] file_size -> 231.69Kb diff --git a/docs/assets/text/cellstylev2.txt b/docs/assets/text/cellstylev2.txt index a3b00cea..c8c2afc6 100644 --- a/docs/assets/text/cellstylev2.txt +++ b/docs/assets/text/cellstylev2.txt @@ -1,3 +1,3 @@ -generate -> avg: 16.26ms, executions: [16.26ms] -add_rows -> avg: 131.45ns, executions: [0.72μs, 0.21μs, 0.15μs, 0.09μs, 0.11μs, 0.07μs, 0.06μs, 0.07μs, 0.10μs, 0.07μs, 0.04μs, 0.07μs, 0.04μs, 0.07μs, 0.04μs, 0.10μs, 2.35μs, 0.09μs, 0.04μs, 0.08μs, 0.05μs, 0.07μs, 0.04μs, 0.06μs, 0.04μs, 0.07μs, 0.43μs, 0.13μs, 0.08μs, 0.07μs, 0.09μs, 0.09μs, 0.05μs, 0.07μs, 0.09μs, 0.07μs, 0.04μs, 0.07μs, 0.04μs, 0.09μs, 0.07μs, 0.07μs, 0.12μs, 0.07μs, 0.04μs, 0.07μs, 0.04μs, 0.07μs, 0.04μs, 0.07μs, 0.03μs, 0.06μs, 0.28μs, 0.11μs, 0.09μs, 0.08μs, 0.09μs, 0.08μs, 0.04μs, 0.09μs] +generate -> avg: 18.81ms, executions: [18.81ms] +add_rows -> avg: 218.25ns, executions: [1.02μs, 0.28μs, 0.20μs, 0.11μs, 0.22μs, 0.08μs, 0.07μs, 0.08μs, 0.25μs, 0.08μs, 0.05μs, 0.07μs, 0.21μs, 1.43μs, 0.05μs, 0.10μs, 0.46μs, 0.10μs, 0.05μs, 0.08μs, 0.05μs, 0.08μs, 0.04μs, 0.08μs, 0.06μs, 0.08μs, 0.60μs, 0.16μs, 0.09μs, 0.07μs, 0.10μs, 0.08μs, 0.05μs, 0.10μs, 0.12μs, 4.28μs, 0.12μs, 0.12μs, 0.05μs, 0.08μs, 0.04μs, 0.08μs, 0.13μs, 0.08μs, 0.05μs, 0.08μs, 0.06μs, 0.08μs, 0.05μs, 0.07μs, 0.05μs, 0.07μs, 0.32μs, 0.10μs, 0.09μs, 0.08μs, 0.09μs, 0.08μs, 0.04μs, 0.07μs] file_size -> 28.60Kb diff --git a/docs/assets/text/compressionv2.txt b/docs/assets/text/compressionv2.txt index 2664fd3f..e035c60c 100644 --- a/docs/assets/text/compressionv2.txt +++ b/docs/assets/text/compressionv2.txt @@ -1,3 +1,3 @@ -generate -> avg: 3.57ms, executions: [3.57ms] -add_rows -> avg: 274.00ns, executions: [524.00ns, 296.00ns, 180.00ns, 96.00ns] +generate -> avg: 8.33ms, executions: [8.33ms] +add_rows -> avg: 699.50ns, executions: [0.60μs, 1.07μs, 0.85μs, 0.28μs] file_size -> 224.69Kb diff --git a/docs/assets/text/customdimensionsv2.txt b/docs/assets/text/customdimensionsv2.txt index 35d219c7..4e14b88d 100644 --- a/docs/assets/text/customdimensionsv2.txt +++ b/docs/assets/text/customdimensionsv2.txt @@ -1,3 +1,3 @@ -generate -> avg: 877.17μs, executions: [877.17μs] -add_row -> avg: 772.00ns, executions: [772.00ns] +generate -> avg: 5.72ms, executions: [5.72ms] +add_row -> avg: 1543.00ns, executions: [1.54μs] file_size -> 205.24Kb diff --git a/docs/assets/text/customfontv2.txt b/docs/assets/text/customfontv2.txt index 19e07f7a..8dd20c02 100644 --- a/docs/assets/text/customfontv2.txt +++ b/docs/assets/text/customfontv2.txt @@ -1,4 +1,4 @@ -generate -> avg: 35.13ms, executions: [35.13ms] -add_row -> avg: 117.07ns, executions: [1.75μs, 0.23μs, 0.14μs, 0.07μs, 0.13μs, 0.07μs, 0.07μs, 0.06μs, 0.13μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.16μs, 0.07μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.07μs, 0.07μs, 0.07μs, 0.06μs, 0.06μs, 0.07μs, 0.11μs, 0.06μs, 0.19μs, 0.06μs, 0.06μs, 0.08μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.67μs, 0.12μs, 0.11μs, 0.06μs, 0.11μs, 0.06μs, 0.07μs, 0.07μs, 1.10μs, 0.07μs, 0.06μs, 0.06μs, 0.07μs, 0.07μs, 0.07μs, 0.07μs, 0.15μs, 0.07μs, 0.06μs, 0.07μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.07μs, 0.06μs, 0.06μs, 0.13μs, 0.06μs, 0.06μs, 0.07μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 0.07μs, 0.06μs, 0.06μs, 0.06μs, 0.06μs, 1.52μs, 0.10μs, 0.11μs, 0.07μs, 0.12μs, 0.14μs] -add_rows -> avg: 93.00ns, executions: [93.00ns] +generate -> avg: 48.70ms, executions: [48.70ms] +add_row -> avg: 324.05ns, executions: [2.45μs, 0.49μs, 0.22μs, 0.11μs, 0.44μs, 0.10μs, 0.09μs, 0.09μs, 0.28μs, 0.09μs, 0.13μs, 0.12μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 0.62μs, 0.09μs, 0.09μs, 0.31μs, 0.10μs, 0.09μs, 0.09μs, 0.31μs, 0.10μs, 0.10μs, 0.09μs, 0.10μs, 0.10μs, 0.09μs, 0.09μs, 0.09μs, 3.95μs, 0.26μs, 0.10μs, 0.09μs, 0.09μs, 0.31μs, 0.10μs, 0.09μs, 0.09μs, 0.43μs, 0.10μs, 0.10μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 7.71μs, 0.33μs, 0.36μs, 0.10μs, 0.16μs, 0.09μs, 0.10μs, 0.09μs, 6.81μs, 0.26μs, 0.30μs, 0.10μs, 0.10μs, 0.10μs, 0.10μs, 0.09μs, 0.26μs, 0.09μs, 0.10μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 0.11μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 0.21μs, 0.09μs, 0.09μs, 0.10μs, 0.11μs, 0.09μs, 0.11μs, 0.10μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 0.09μs, 0.11μs, 0.09μs, 0.10μs, 0.73μs, 0.15μs, 0.20μs, 0.10μs, 0.14μs, 0.20μs] +add_rows -> avg: 140.00ns, executions: [140.00ns] file_size -> 286.87Kb diff --git a/docs/assets/text/custompagev2.txt b/docs/assets/text/custompagev2.txt index d2a7f7cd..33d2507d 100644 --- a/docs/assets/text/custompagev2.txt +++ b/docs/assets/text/custompagev2.txt @@ -1,3 +1,3 @@ -generate -> avg: 890.15μs, executions: [890.15μs] -add_row -> avg: 605.00ns, executions: [605.00ns] +generate -> avg: 5.24ms, executions: [5.24ms] +add_row -> avg: 1197.00ns, executions: [1.20μs] file_size -> 205.16Kb diff --git a/docs/assets/text/datamatrixgridv2.txt b/docs/assets/text/datamatrixgridv2.txt index 57dedcd9..4b613d16 100644 --- a/docs/assets/text/datamatrixgridv2.txt +++ b/docs/assets/text/datamatrixgridv2.txt @@ -1,3 +1,3 @@ -generate -> avg: 208.60μs, executions: [208.60μs] -add_row -> avg: 288.25ns, executions: [833.00ns, 145.00ns, 105.00ns, 70.00ns] +generate -> avg: 177.74μs, executions: [177.74μs] +add_row -> avg: 315.50ns, executions: [876.00ns, 162.00ns, 134.00ns, 90.00ns] file_size -> 5.27Kb diff --git a/docs/assets/text/disablepagebreakv2.txt b/docs/assets/text/disablepagebreakv2.txt index 43341dc4..acc69964 100644 --- a/docs/assets/text/disablepagebreakv2.txt +++ b/docs/assets/text/disablepagebreakv2.txt @@ -1,3 +1,3 @@ -generate -> avg: 137.31ms, executions: [137.31ms] -add_page -> avg: 396.00ns, executions: [396.00ns] +generate -> avg: 130.19ms, executions: [130.19ms] +add_page -> avg: 495.00ns, executions: [495.00ns] file_size -> 806.50Kb diff --git a/docs/assets/text/footerv2.txt b/docs/assets/text/footerv2.txt index cac84c43..b14a01d3 100644 --- a/docs/assets/text/footerv2.txt +++ b/docs/assets/text/footerv2.txt @@ -1,4 +1,4 @@ -generate -> avg: 11.36ms, executions: [11.36ms] -footer -> avg: 358.00ns, executions: [358.00ns] -add_rows -> avg: 109.78ns, executions: [0.43μs, 0.11μs, 0.09μs, 0.04μs, 0.08μs, 0.03μs, 0.03μs, 0.03μs, 0.08μs, 0.03μs, 0.03μs, 0.02μs, 0.02μs, 0.02μs, 0.03μs, 0.03μs, 2.38μs, 0.03μs, 0.04μs, 0.03μs, 0.03μs, 0.03μs, 0.03μs, 0.02μs, 0.61μs, 0.09μs, 0.06μs, 0.03μs, 0.07μs, 0.03μs, 0.03μs, 0.03μs, 0.07μs, 0.03μs, 0.03μs, 0.03μs, 0.03μs, 0.02μs, 0.02μs, 0.02μs, 0.10μs, 0.03μs, 0.03μs, 0.03μs, 0.03μs, 0.03μs, 0.03μs, 0.03μs, 0.31μs, 0.07μs] +generate -> avg: 10.27ms, executions: [10.27ms] +footer -> avg: 1.09μs, executions: [1.09μs] +add_rows -> avg: 88.82ns, executions: [257.00ns, 118.00ns, 90.00ns, 45.00ns, 101.00ns, 40.00ns, 31.00ns, 30.00ns, 167.00ns, 39.00ns, 32.00ns, 29.00ns, 31.00ns, 31.00ns, 30.00ns, 30.00ns, 554.00ns, 32.00ns, 30.00ns, 29.00ns, 215.00ns, 32.00ns, 32.00ns, 35.00ns, 607.00ns, 122.00ns, 72.00ns, 31.00ns, 70.00ns, 31.00ns, 33.00ns, 32.00ns, 82.00ns, 29.00ns, 32.00ns, 31.00ns, 30.00ns, 30.00ns, 33.00ns, 32.00ns, 104.00ns, 33.00ns, 30.00ns, 260.00ns, 46.00ns, 37.00ns, 33.00ns, 33.00ns, 443.00ns, 65.00ns] file_size -> 14.76Kb diff --git a/docs/assets/text/headerv2.txt b/docs/assets/text/headerv2.txt index b98c5d06..583d8f9b 100644 --- a/docs/assets/text/headerv2.txt +++ b/docs/assets/text/headerv2.txt @@ -1,4 +1,4 @@ -generate -> avg: 8.85ms, executions: [8.85ms] -header -> avg: 502.00ns, executions: [502.00ns] -add_rows -> avg: 92.06ns, executions: [0.18μs, 0.06μs, 0.04μs, 0.07μs, 0.03μs, 0.02μs, 0.02μs, 0.07μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 2.20μs, 0.03μs, 0.02μs, 0.03μs, 0.02μs, 0.02μs, 0.02μs, 0.03μs, 0.02μs, 0.50μs, 0.08μs, 0.02μs, 0.06μs, 0.03μs, 0.02μs, 0.02μs, 0.07μs, 0.03μs, 0.02μs, 0.02μs, 0.02μs, 0.03μs, 0.03μs, 0.02μs, 0.09μs, 0.02μs, 0.02μs, 0.02μs, 0.03μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.26μs, 0.06μs] +generate -> avg: 10.76ms, executions: [10.76ms] +header -> avg: 1.39μs, executions: [1.39μs] +add_rows -> avg: 95.96ns, executions: [250.00ns, 92.00ns, 47.00ns, 259.00ns, 40.00ns, 33.00ns, 32.00ns, 228.00ns, 32.00ns, 33.00ns, 35.00ns, 33.00ns, 32.00ns, 31.00ns, 31.00ns, 590.00ns, 35.00ns, 32.00ns, 32.00ns, 257.00ns, 35.00ns, 36.00ns, 36.00ns, 36.00ns, 790.00ns, 103.00ns, 35.00ns, 83.00ns, 34.00ns, 32.00ns, 32.00ns, 90.00ns, 33.00ns, 31.00ns, 33.00ns, 33.00ns, 33.00ns, 30.00ns, 34.00ns, 112.00ns, 32.00ns, 30.00ns, 32.00ns, 253.00ns, 35.00ns, 35.00ns, 34.00ns, 35.00ns, 398.00ns, 79.00ns] file_size -> 14.75Kb diff --git a/docs/assets/text/imagegridv2.txt b/docs/assets/text/imagegridv2.txt index 76f712f0..c126fbbb 100644 --- a/docs/assets/text/imagegridv2.txt +++ b/docs/assets/text/imagegridv2.txt @@ -1,3 +1,3 @@ -generate -> avg: 11.30ms, executions: [11.30ms] -add_row -> avg: 315.83ns, executions: [954.00ns, 264.00ns, 254.00ns, 146.00ns, 169.00ns, 108.00ns] +generate -> avg: 4.76ms, executions: [4.76ms] +add_row -> avg: 292.83ns, executions: [1.03μs, 0.18μs, 0.19μs, 0.12μs, 0.15μs, 0.08μs] file_size -> 224.21Kb diff --git a/docs/assets/text/linegridv2.txt b/docs/assets/text/linegridv2.txt index 64527791..3d143fc1 100644 --- a/docs/assets/text/linegridv2.txt +++ b/docs/assets/text/linegridv2.txt @@ -1,3 +1,3 @@ -generate -> avg: 86.67μs, executions: [86.67μs] -add_row -> avg: 232.60ns, executions: [661.00ns, 162.00ns, 119.00ns, 82.00ns, 139.00ns] +generate -> avg: 118.60μs, executions: [118.60μs] +add_row -> avg: 431.60ns, executions: [1.28μs, 0.25μs, 0.22μs, 0.12μs, 0.29μs] file_size -> 2.89Kb diff --git a/docs/assets/text/listv2.txt b/docs/assets/text/listv2.txt index 9b752c5f..3d1fdf4a 100644 --- a/docs/assets/text/listv2.txt +++ b/docs/assets/text/listv2.txt @@ -1,3 +1,3 @@ -generate -> avg: 39.47ms, executions: [39.47ms] -add_rows -> avg: 4802.00ns, executions: [4.80μs] +generate -> avg: 47.81ms, executions: [47.81ms] +add_rows -> avg: 8002.00ns, executions: [8.00μs] file_size -> 48.85Kb diff --git a/docs/assets/text/lowmemoryv2.txt b/docs/assets/text/lowmemoryv2.txt index 1953f46b..1b88bfc9 100644 --- a/docs/assets/text/lowmemoryv2.txt +++ b/docs/assets/text/lowmemoryv2.txt @@ -1,3 +1,3 @@ -generate -> avg: 9.86ms, executions: [9.86ms] -add_rows -> avg: 97.34ns, executions: [0.81μs, 0.11μs, 0.06μs, 0.04μs, 0.06μs, 0.03μs, 0.02μs, 0.02μs, 0.09μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 2.07μs, 0.03μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.03μs, 0.43μs, 0.08μs, 0.06μs, 0.02μs, 0.06μs, 0.02μs, 0.02μs, 0.02μs, 0.06μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.09μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.03μs] +generate -> avg: 14.09ms, executions: [14.09ms] +add_rows -> avg: 102.38ns, executions: [1.12μs, 0.13μs, 0.09μs, 0.05μs, 0.11μs, 0.04μs, 0.04μs, 0.04μs, 0.13μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.03μs, 0.04μs, 0.54μs, 0.04μs, 0.04μs, 0.03μs, 0.03μs, 0.04μs, 0.04μs, 0.04μs, 0.27μs, 0.04μs, 0.88μs, 0.11μs, 0.08μs, 0.04μs, 0.09μs, 0.05μs, 0.03μs, 0.03μs, 0.09μs, 0.04μs, 0.03μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.12μs, 0.04μs, 0.03μs, 0.03μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs] file_size -> 2.52Kb diff --git a/docs/assets/text/marginsv2.txt b/docs/assets/text/marginsv2.txt index 648a1596..910e4039 100644 --- a/docs/assets/text/marginsv2.txt +++ b/docs/assets/text/marginsv2.txt @@ -1,4 +1,4 @@ -generate -> avg: 375.09ms, executions: [375.09ms] -header -> avg: 571.00ns, executions: [571.00ns] -add_rows -> avg: 100.50ns, executions: [186.00ns, 64.00ns, 32.00ns, 59.00ns, 22.00ns, 23.00ns, 23.00ns, 518.00ns, 57.00ns, 21.00ns] +generate -> avg: 491.90ms, executions: [491.90ms] +header -> avg: 1.67μs, executions: [1.67μs] +add_rows -> avg: 151.10ns, executions: [260.00ns, 92.00ns, 50.00ns, 121.00ns, 48.00ns, 36.00ns, 37.00ns, 733.00ns, 88.00ns, 46.00ns] file_size -> 256.74Kb diff --git a/docs/assets/text/maxgridsumv2.txt b/docs/assets/text/maxgridsumv2.txt index b0a2626a..3d40e4d9 100644 --- a/docs/assets/text/maxgridsumv2.txt +++ b/docs/assets/text/maxgridsumv2.txt @@ -1,4 +1,4 @@ -generate -> avg: 8.11ms, executions: [8.11ms] -add_row -> avg: 1421.50ns, executions: [2.45μs, 0.39μs] -add_rows -> avg: 843.00ns, executions: [843.00ns] +generate -> avg: 6.14ms, executions: [6.14ms] +add_row -> avg: 621.00ns, executions: [845.00ns, 397.00ns] +add_rows -> avg: 1292.00ns, executions: [1.29μs] file_size -> 8.13Kb diff --git a/docs/assets/text/mergepdfv2.txt b/docs/assets/text/mergepdfv2.txt index 0f8cf9f0..81d32526 100644 --- a/docs/assets/text/mergepdfv2.txt +++ b/docs/assets/text/mergepdfv2.txt @@ -1,4 +1,4 @@ -generate -> avg: 16.83ms, executions: [16.83ms] -add_rows -> avg: 97.58ns, executions: [0.40μs, 0.11μs, 0.07μs, 0.04μs, 0.07μs, 0.03μs, 0.03μs, 0.03μs, 0.09μs, 0.03μs, 0.02μs, 0.02μs, 0.02μs, 2.01μs, 0.08μs, 0.06μs, 0.02μs, 0.07μs, 0.03μs, 0.04μs, 0.02μs, 0.06μs, 0.02μs, 0.02μs, 0.03μs, 0.03μs, 0.30μs, 0.06μs, 0.06μs, 0.02μs, 0.06μs, 0.02μs, 0.03μs, 0.03μs, 0.08μs, 0.06μs, 0.03μs, 0.02μs, 0.02μs, 0.23μs, 0.06μs, 0.06μs, 0.02μs, 0.06μs, 0.02μs, 0.03μs, 0.03μs, 0.08μs, 0.03μs, 0.03μs] -merge_pdf -> avg: 4.11ms, executions: [4.11ms] +generate -> avg: 12.13ms, executions: [12.13ms] +add_rows -> avg: 106.46ns, executions: [1.09μs, 0.13μs, 0.10μs, 0.05μs, 0.12μs, 0.04μs, 0.04μs, 0.04μs, 0.11μs, 0.04μs, 0.04μs, 0.03μs, 0.04μs, 0.87μs, 0.08μs, 0.06μs, 0.03μs, 0.08μs, 0.04μs, 0.03μs, 0.03μs, 0.10μs, 0.04μs, 0.24μs, 0.04μs, 0.04μs, 0.35μs, 0.08μs, 0.08μs, 0.04μs, 0.09μs, 0.04μs, 0.04μs, 0.04μs, 0.09μs, 0.03μs, 0.04μs, 0.03μs, 0.03μs, 0.28μs, 0.08μs, 0.08μs, 0.03μs, 0.09μs, 0.04μs, 0.04μs, 0.04μs, 0.09μs, 0.03μs, 0.03μs] +merge_pdf -> avg: 1.83ms, executions: [1.83ms] file_size -> 280.85Kb diff --git a/docs/assets/text/metadatasv2.txt b/docs/assets/text/metadatasv2.txt index 9f6fd5af..3ea40820 100644 --- a/docs/assets/text/metadatasv2.txt +++ b/docs/assets/text/metadatasv2.txt @@ -1,3 +1,3 @@ -generate -> avg: 217.90μs, executions: [217.90μs] -add_rows -> avg: 554.00ns, executions: [554.00ns] +generate -> avg: 362.78μs, executions: [362.78μs] +add_rows -> avg: 1381.00ns, executions: [1.38μs] file_size -> 1.32Kb diff --git a/docs/assets/text/orientationv2.txt b/docs/assets/text/orientationv2.txt index f69862cf..2689f58b 100644 --- a/docs/assets/text/orientationv2.txt +++ b/docs/assets/text/orientationv2.txt @@ -1,3 +1,3 @@ -generate -> avg: 220.83μs, executions: [220.83μs] -add_rows -> avg: 364.00ns, executions: [364.00ns] +generate -> avg: 281.33μs, executions: [281.33μs] +add_rows -> avg: 1066.00ns, executions: [1.07μs] file_size -> 1.29Kb diff --git a/docs/assets/text/pagenumberv2.txt b/docs/assets/text/pagenumberv2.txt index dd3010c0..f3f06b32 100644 --- a/docs/assets/text/pagenumberv2.txt +++ b/docs/assets/text/pagenumberv2.txt @@ -1,3 +1,3 @@ -generate -> avg: 2.95ms, executions: [2.95ms] -add_rows -> avg: 240.13ns, executions: [0.52μs, 0.10μs, 0.06μs, 0.03μs, 0.07μs, 0.03μs, 0.02μs, 0.02μs, 0.08μs, 0.03μs, 0.02μs, 0.02μs, 0.02μs, 2.51μs, 0.07μs] +generate -> avg: 4.08ms, executions: [4.08ms] +add_rows -> avg: 167.53ns, executions: [920.00ns, 141.00ns, 91.00ns, 56.00ns, 132.00ns, 44.00ns, 36.00ns, 35.00ns, 121.00ns, 36.00ns, 35.00ns, 35.00ns, 34.00ns, 724.00ns, 73.00ns] file_size -> 5.72Kb diff --git a/docs/assets/text/parallelismv2.txt b/docs/assets/text/parallelismv2.txt index 5454356a..aadd07fa 100644 --- a/docs/assets/text/parallelismv2.txt +++ b/docs/assets/text/parallelismv2.txt @@ -1,3 +1,3 @@ -generate -> avg: 5.52ms, executions: [5.52ms] -add_rows -> avg: 102.30ns, executions: [0.62μs, 0.10μs, 0.07μs, 0.03μs, 0.07μs, 0.03μs, 0.02μs, 0.02μs, 0.07μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 2.41μs, 0.02μs, 0.02μs, 0.02μs, 0.03μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.04μs, 0.48μs, 0.08μs, 0.10μs, 0.02μs, 0.07μs, 0.02μs, 0.02μs, 0.02μs, 0.05μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.02μs, 0.08μs, 0.02μs, 0.02μs, 0.02μs, 0.03μs, 0.02μs, 0.03μs, 0.03μs] +generate -> avg: 10.81ms, executions: [10.81ms] +add_rows -> avg: 102.58ns, executions: [1.40μs, 0.13μs, 0.10μs, 0.04μs, 0.10μs, 0.04μs, 0.04μs, 0.04μs, 0.12μs, 0.03μs, 0.03μs, 0.03μs, 0.04μs, 0.03μs, 0.03μs, 0.03μs, 0.52μs, 0.04μs, 0.04μs, 0.03μs, 0.03μs, 0.04μs, 0.04μs, 0.05μs, 0.25μs, 0.04μs, 0.68μs, 0.12μs, 0.09μs, 0.04μs, 0.10μs, 0.04μs, 0.03μs, 0.03μs, 0.09μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.04μs, 0.03μs, 0.11μs, 0.04μs, 0.03μs, 0.04μs, 0.04μs, 0.03μs, 0.03μs, 0.04μs] file_size -> 2.52Kb diff --git a/docs/assets/text/protectionv2.txt b/docs/assets/text/protectionv2.txt index d696959d..b61e36e2 100644 --- a/docs/assets/text/protectionv2.txt +++ b/docs/assets/text/protectionv2.txt @@ -1,3 +1,3 @@ -generate -> avg: 232.51μs, executions: [232.51μs] -add_rows -> avg: 609.00ns, executions: [609.00ns] +generate -> avg: 310.73μs, executions: [310.73μs] +add_rows -> avg: 988.00ns, executions: [988.00ns] file_size -> 1.42Kb diff --git a/docs/assets/text/qrgridv2.txt b/docs/assets/text/qrgridv2.txt index a9704084..073caa93 100644 --- a/docs/assets/text/qrgridv2.txt +++ b/docs/assets/text/qrgridv2.txt @@ -1,3 +1,3 @@ -generate -> avg: 203.90μs, executions: [203.90μs] -add_row -> avg: 232.00ns, executions: [619.00ns, 132.00ns, 106.00ns, 71.00ns] +generate -> avg: 199.99μs, executions: [199.99μs] +add_row -> avg: 426.00ns, executions: [1.25μs, 0.21μs, 0.14μs, 0.10μs] file_size -> 5.34Kb diff --git a/docs/assets/text/signaturegridv2.txt b/docs/assets/text/signaturegridv2.txt index 2374eb39..63d5e9ce 100644 --- a/docs/assets/text/signaturegridv2.txt +++ b/docs/assets/text/signaturegridv2.txt @@ -1,3 +1,3 @@ -generate -> avg: 2.13ms, executions: [2.13ms] -add_row -> avg: 255.00ns, executions: [502.00ns, 143.00ns, 120.00ns] +generate -> avg: 2.90ms, executions: [2.90ms] +add_row -> avg: 520.00ns, executions: [1.19μs, 0.23μs, 0.14μs] file_size -> 6.27Kb diff --git a/docs/assets/text/textgridv2.txt b/docs/assets/text/textgridv2.txt index 72204d05..3f2a13b8 100644 --- a/docs/assets/text/textgridv2.txt +++ b/docs/assets/text/textgridv2.txt @@ -1,4 +1,4 @@ -generate -> avg: 36.66ms, executions: [36.66ms] -add_row -> avg: 1401.00ns, executions: [3.05μs, 0.88μs, 0.61μs, 0.58μs, 0.66μs, 2.62μs] -add_rows -> avg: 368.83ns, executions: [511.00ns, 430.00ns, 190.00ns, 441.00ns, 130.00ns, 511.00ns] +generate -> avg: 6.61ms, executions: [6.61ms] +add_row -> avg: 494.50ns, executions: [1.50μs, 0.24μs, 0.14μs, 0.10μs, 0.12μs, 0.86μs] +add_rows -> avg: 109.83ns, executions: [181.00ns, 115.00ns, 58.00ns, 142.00ns, 53.00ns, 110.00ns] file_size -> 30.68Kb diff --git a/internal/fixture/fixture.go b/internal/fixture/fixture.go index 07762285..890be843 100644 --- a/internal/fixture/fixture.go +++ b/internal/fixture/fixture.go @@ -24,6 +24,7 @@ func TextProp() props.Text { prop := props.Text{ Top: 12, + Bottom: 13, Left: 3, Family: fontProp.Family, Style: fontProp.Style, diff --git a/pkg/components/text/text.go b/pkg/components/text/text.go index 023bc172..3f278928 100644 --- a/pkg/components/text/text.go +++ b/pkg/components/text/text.go @@ -66,7 +66,7 @@ func (t *Text) GetHeight(provider core.Provider, cell *entity.Cell) float64 { amountLines := provider.GetLinesQuantity(t.value, &t.prop, cell.Width-t.prop.Left-t.prop.Right) fontHeight := provider.GetFontHeight(&props.Font{Family: t.prop.Family, Style: t.prop.Style, Size: t.prop.Size, Color: t.prop.Color}) textHeight := float64(amountLines)*fontHeight + float64(amountLines-1)*t.prop.VerticalPadding - return textHeight + t.prop.Top + return textHeight + t.prop.Top + t.prop.Bottom } // SetConfig sets the config. diff --git a/pkg/props/text.go b/pkg/props/text.go index bfb22d94..560ca696 100644 --- a/pkg/props/text.go +++ b/pkg/props/text.go @@ -11,6 +11,8 @@ import ( type Text struct { // Top is the amount of space between the upper cell limit and the text. Top float64 + // Bottom is the amount of space between the lower cell limit and the text. (Used by auto row only) + Bottom float64 // Left is the minimal amount of space between the left cell boundary and the text. Left float64 // Right is the minimal amount of space between the right cell boundary and the text. @@ -39,6 +41,9 @@ func (t *Text) ToMap() map[string]interface{} { if t.Top != 0 { m["prop_top"] = t.Top } + if t.Bottom != 0 { + m["prop_bottom"] = t.Bottom + } if t.Left != 0 { m["prop_left"] = t.Left @@ -112,6 +117,10 @@ func (t *Text) MakeValid(font *Font) { t.Top = minValue } + if t.Bottom < minValue { + t.Bottom = minValue + } + if t.Left < minValue { t.Left = minValue } diff --git a/test/maroto/components/texts/new_text_auto_row_custom_prop.json b/test/maroto/components/texts/new_text_auto_row_custom_prop.json index 78382f06..08e1cab0 100755 --- a/test/maroto/components/texts/new_text_auto_row_custom_prop.json +++ b/test/maroto/components/texts/new_text_auto_row_custom_prop.json @@ -14,6 +14,7 @@ "type": "text", "details": { "prop_align": "R", + "prop_bottom": 13, "prop_breakline_strategy": "dash_strategy", "prop_color": "RGB(100, 50, 200)", "prop_font_family": "helvetica", diff --git a/test/maroto/components/texts/new_text_col_custom_prop.json b/test/maroto/components/texts/new_text_col_custom_prop.json index 35476f31..3bfb1667 100755 --- a/test/maroto/components/texts/new_text_col_custom_prop.json +++ b/test/maroto/components/texts/new_text_col_custom_prop.json @@ -7,6 +7,7 @@ "type": "text", "details": { "prop_align": "R", + "prop_bottom": 13, "prop_breakline_strategy": "dash_strategy", "prop_color": "RGB(100, 50, 200)", "prop_font_family": "helvetica", diff --git a/test/maroto/components/texts/new_text_custom_prop.json b/test/maroto/components/texts/new_text_custom_prop.json index b174a8b1..6ba9bbe4 100755 --- a/test/maroto/components/texts/new_text_custom_prop.json +++ b/test/maroto/components/texts/new_text_custom_prop.json @@ -3,6 +3,7 @@ "type": "text", "details": { "prop_align": "R", + "prop_bottom": 13, "prop_breakline_strategy": "dash_strategy", "prop_color": "RGB(100, 50, 200)", "prop_font_family": "helvetica", diff --git a/test/maroto/components/texts/new_text_row_custom_prop.json b/test/maroto/components/texts/new_text_row_custom_prop.json index dd3c9399..8f03da4b 100755 --- a/test/maroto/components/texts/new_text_row_custom_prop.json +++ b/test/maroto/components/texts/new_text_row_custom_prop.json @@ -14,6 +14,7 @@ "type": "text", "details": { "prop_align": "R", + "prop_bottom": 13, "prop_breakline_strategy": "dash_strategy", "prop_color": "RGB(100, 50, 200)", "prop_font_family": "helvetica", diff --git a/test/maroto/examples/autorow.json b/test/maroto/examples/autorow.json index ca067061..ccc53a65 100755 --- a/test/maroto/examples/autorow.json +++ b/test/maroto/examples/autorow.json @@ -92,6 +92,44 @@ } ] }, + { + "value": 81.20555555555556, + "type": "row", + "nodes": [ + { + "value": 5, + "type": "col", + "nodes": [ + { + "value": "docs/assets/images/biplane.jpg", + "type": "fileImage", + "details": { + "prop_percent": 100 + } + } + ] + }, + { + "value": 7, + "type": "col", + "nodes": [ + { + "value": "Numa toca no chão vivia um hobbit. Não uma toca nojenta, suja, úmida, \ncheia de pontas de minhocas e um cheiro de limo, nem tam pouco uma toca seca, vazia, arenosa, \nsem nenhum lugar onde se sentar ou onde comer: era uma toca de hobbit, e isso significa conforto.\nEla tinha uma porta perfeitamente redonda feito uma escotilha, pintada de verde, com uma maçaneta\namarela e brilhante de latão exatamente no meio. A porta se abria para um corredor em forma de tubo,\nfeito um túnel: um túnel muito confortável, sem fumaça, de paredes com painéis e assoalhos\nazulejados e acarpetados, com cadeiras enceradas e montes e montes de cabieiros para chapéus e\ncasacos - o hobbit apreciava visitas.", + "type": "text", + "details": { + "prop_align": "L", + "prop_bottom": 9, + "prop_breakline_strategy": "empty_space_strategy", + "prop_color": "RGB(0, 0, 0)", + "prop_font_family": "arial", + "prop_font_size": 13, + "prop_top": 8 + } + } + ] + } + ] + }, { "value": 35.27777777777778, "type": "row", @@ -166,6 +204,21 @@ } ] }, + { + "value": 0.0030555555555338287, + "type": "row", + "nodes": [ + { + "value": 12, + "type": "col" + } + ] + } + ] + }, + { + "type": "page", + "nodes": [ { "value": 31.666666666666664, "type": "row", @@ -203,7 +256,7 @@ ] }, { - "value": 49.541944444444454, + "value": 235.33083333333335, "type": "row", "nodes": [ {