From: wout Date: Tue, 28 May 2013 20:09:26 +0000 (+0100) Subject: Updated README X-Git-Tag: 0.17~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6b1740abb72a113a35b499acf15a96945876122f;p=svg.js.git Updated README --- diff --git a/README.md b/README.md index 208f5e9..802ca59 100644 --- a/README.md +++ b/README.md @@ -474,8 +474,15 @@ This will return an instance of `SVG.BBox` containing the following values: { height: 20, width: 20, y: 20, x: 10, cx: 30, cy: 20 } ``` -As opposed to the native `getBBox()` method any translations used with the `transform()` method will be taken into account. +As opposed to the native `getBBox()` method any translations used with the `transform()` method will be taken into account. +The `SVG.BBox` has one other nify little feature, enter the `merge()` method. With `merge()` two `SVG.BBox` instances can be merged into one new instance, basically being the bounding box of the two original bounding boxes: + +```javascript +var box1 = draw.rect(100,100).move(50,50) +var box2 = draw.rect(100,100).move(200,200) +var box3 = box1.merge(box2) +``` ### Rectagular box Is similar to `bbox()` but will give you the box around the exact representation of the element, taking all transformations into account.