diff options
author | Hans Hagen <pragma@wxs.nl> | 2023-01-24 15:11:58 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2023-01-24 15:11:58 +0100 |
commit | b47e8c2cdeeab0bcdb1c4c32328c933f3f8599de (patch) | |
tree | 8e32282155744f2b0a812eff2fe88bbc919a70b4 /tex/context/base/mkxl/pack-rul.mkxl | |
parent | 0caec226a633182402b349c3ac5b3bf9e0bc76c2 (diff) | |
download | context-b47e8c2cdeeab0bcdb1c4c32328c933f3f8599de.tar.gz |
2023-01-24 13:50:00
Diffstat (limited to 'tex/context/base/mkxl/pack-rul.mkxl')
-rw-r--r-- | tex/context/base/mkxl/pack-rul.mkxl | 60 |
1 files changed, 42 insertions, 18 deletions
diff --git a/tex/context/base/mkxl/pack-rul.mkxl b/tex/context/base/mkxl/pack-rul.mkxl index 9b87d95b0..baaab17a5 100644 --- a/tex/context/base/mkxl/pack-rul.mkxl +++ b/tex/context/base/mkxl/pack-rul.mkxl @@ -273,32 +273,56 @@ corner {\p_framed_backgroundcorner} \relax}} +% we keep this as reference (should still work when uncommented) +% +% \def\pack_framed_stroked_box +% {\edef\p_framed_framecorner{\framedparameter\c!framecorner}% +% \ifx\p_framed_framecorner\v!rectangular +% \pack_framed_stroked_box_normal +% \else +% \pack_framed_stroked_box_radius +% \fi} +% +% \def\pack_framed_stroked_box_radius +% {\edef\p_framed_frameradius{\framedparameter\c!frameradius}% +% \ifzeropt\dimexpr\p_framed_frameradius\relax % just in case of .x\bodyfontsize +% \pack_framed_stroked_box_normal +% \orelse\ifx\p_framed_frame\v!on +% \pack_framed_stroked_box_round +% \fi} +% +% % \pack_framed_stroked_box_normal % later +% +% \def\pack_framed_stroked_box_round +% {\raise\d_framed_target_dp\hpack{\frule +% width \d_framed_target_wd +% height \d_framed_target_ht +% depth \d_framed_target_dp +% line \d_framed_linewidth +% radius \p_framed_frameradius\space +% corner {\p_framed_framecorner} +% \relax}} +% +% corner is the parent of framecorner and backgroundcorner (round value never checked) +% when 'round' is passed it is not a number and therefore we get four sides + \def\pack_framed_stroked_box {\edef\p_framed_framecorner{\framedparameter\c!framecorner}% \ifx\p_framed_framecorner\v!rectangular \pack_framed_stroked_box_normal - \else - \pack_framed_stroked_box_radius - \fi} - -\def\pack_framed_stroked_box_radius - {\edef\p_framed_frameradius{\framedparameter\c!frameradius}% - \ifzeropt\dimexpr\p_framed_frameradius\relax % just in case of .x\bodyfontsize - \pack_framed_stroked_box_normal \orelse\ifx\p_framed_frame\v!on \pack_framed_stroked_box_round \fi} -% \pack_framed_stroked_box_normal % later - -\def\pack_framed_stroked_box_round - {\raise\d_framed_target_dp\hpack{\frule - width \d_framed_target_wd - height \d_framed_target_ht - depth \d_framed_target_dp - line \d_framed_linewidth - radius \p_framed_frameradius\space - corner {\p_framed_framecorner} +\def\pack_framed_stroked_box_round % todo: variant without keywords + {\raise\d_framed_target_dp + \hpack{\clf_roundedoutline % we could access these at the lua end! + \d_framed_target_wd + \d_framed_target_ht + \d_framed_target_dp + \d_framed_linewidth + \framedparameter\c!frameradius + {\p_framed_framecorner} \relax}} % a lot of weird corners |