diff options
Diffstat (limited to 'Build/source/utils/asymptote/bbox.h')
-rw-r--r-- | Build/source/utils/asymptote/bbox.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Build/source/utils/asymptote/bbox.h b/Build/source/utils/asymptote/bbox.h index 3edbe45d7e2..f68bd4022f3 100644 --- a/Build/source/utils/asymptote/bbox.h +++ b/Build/source/utils/asymptote/bbox.h @@ -174,11 +174,13 @@ struct bbox { *this=bbox(); } - void shift(const pair& p) { - left += p.getx(); - right += p.getx(); - bottom += p.gety(); - top += p.gety(); + bbox shift(const pair& p) const { + bbox b=*this; + b.left += p.getx(); + b.right += p.getx(); + b.bottom += p.gety(); + b.top += p.gety(); + return b; } pair Min() const { @@ -233,8 +235,7 @@ inline bbox svgbbox(const bbox& B, pair shift=pair(0,0)) b.top += offset; b.bottom += offset; } - b.shift(pair(1.99*settings::cm,1.9*settings::cm)+shift); - return b; + return b.shift(pair(1.99*settings::cm,1.9*settings::cm)+shift); } } // namespace camp |