diff options
author | Norbert Preining <norbert@preining.info> | 2021-12-28 03:01:00 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2021-12-28 03:01:00 +0000 |
commit | ecdf859b6ce481abfd530425dcf6f0f764bd0001 (patch) | |
tree | 13bc161dc046876ac6c92fce5f9f5034ba9aa573 /graphics/asymptote/bbox.h | |
parent | 790995b7e79697514364450bf9c04f1b8d500838 (diff) |
CTAN sync 202112280300
Diffstat (limited to 'graphics/asymptote/bbox.h')
-rw-r--r-- | graphics/asymptote/bbox.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/graphics/asymptote/bbox.h b/graphics/asymptote/bbox.h index 3edbe45d7e..f68bd4022f 100644 --- a/graphics/asymptote/bbox.h +++ b/graphics/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 |