From 602818b2591b1902c12aade32b48681d4c8698e7 Mon Sep 17 00:00:00 2001 From: Dmitry Baranovskiy Date: Mon, 16 Sep 2013 13:32:40 +1000 Subject: [PATCH] Fix for bug #13 --- dist/reference.html | 34 +++++++++++++++++----------------- src/path.js | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/dist/reference.html b/dist/reference.html index 452c94d..a55a16c 100644 --- a/dist/reference.html +++ b/dist/reference.html @@ -18,7 +18,7 @@
- +
@@ -1574,6 +1574,22 @@ Find dot coordinates on the given cubic bezier curve at the given t.
  • y:numbery coordinate of the end of the curve
  • }
  • alpha:numberangle of the curve derivative at the point
  • }
  • +

    Savage.path.getBBox(path)

    +

    Utility method +Return bounding box of a given path +

    +

    Parameters

    1. path +string +path string
    2. +
    +

    Returns: object bounding box

    +
    1. {
      1. x:numberx coordinate of the left top point of the box +
      2. y:numbery coordinate of the left top point of the box +
      3. x2:numberx coordinate of the right bottom point of the box +
      4. y2:numbery coordinate of the right bottom point of the box +
      5. width:numberwidth of the box +
      6. height:numberheight of the box +
    2. }

    Savage.path.getPointAtLength(path, length)

    Return coordinates of the point located at the given length on the given path.

    @@ -1712,22 +1728,6 @@ Converts path coordinates into relative values. path string

    Returns: array path string

    -

    Savage.pathBBox(path)

    -

    Utility method -Return bounding box of a given path -

    -

    Parameters

    1. path -string -path string
    2. -
    -

    Returns: object bounding box

    -
    1. {
      1. x:numberx coordinate of the left top point of the box -
      2. y:numbery coordinate of the left top point of the box -
      3. x2:numberx coordinate of the right bottom point of the box -
      4. y2:numbery coordinate of the right bottom point of the box -
      5. width:numberwidth of the box -
      6. height:numberheight of the box -
    2. }

    Savage.rad(deg)

    Transform angle to radians

    diff --git a/src/path.js b/src/path.js index c41671c..dc2c6c0 100644 --- a/src/path.js +++ b/src/path.js @@ -1267,7 +1267,7 @@ Savage.plugin(function (Savage, Element, Paper, glob) { \*/ Savage.path.isPointInside = isPointInsidePath; /*\ - * Savage.pathBBox + * Savage.path.getBBox [ method ] ** * Utility method