diff options
author | Karl Berry <karl@freefriends.org> | 2019-03-27 22:27:57 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-03-27 22:27:57 +0000 |
commit | 9121faed0cf54a08882acf41120cf28fc3a32998 (patch) | |
tree | fe7f0c5e9ed02fe4a1fc389c27c88750c2807e43 /Build/source/utils/asymptote/bbox.h | |
parent | b8e24fbf964b4030f68a8484a53d405869693266 (diff) |
asy 2.48 sources
git-svn-id: svn://tug.org/texlive/trunk@50622 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/bbox.h')
-rw-r--r-- | Build/source/utils/asymptote/bbox.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/bbox.h b/Build/source/utils/asymptote/bbox.h index a4c8c92e0b1..dcb4d98b758 100644 --- a/Build/source/utils/asymptote/bbox.h +++ b/Build/source/utils/asymptote/bbox.h @@ -9,6 +9,7 @@ #define BBOX_H #include "pair.h" +#include "settings.h" namespace camp { @@ -222,6 +223,20 @@ inline bbox pad(bbox b1, bbox b2) } } +inline bbox svgbbox(const bbox& B, pair shift=pair(0,0)) +{ + bbox b=B; + double height=b.top-b.bottom; + double threshold=12.0*settings::tex2ps; + if(height < threshold) { + double offset=threshold-height; + b.top += offset; + b.bottom += offset; + } + b.shift(pair(1.99*settings::cm,1.9*settings::cm)+shift); + return b; +} + } // namespace camp GC_DECLARE_PTRFREE(camp::bbox); |