diff options
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); |