fix cropCanvas bounding box
Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
This commit is contained in:
parent
b71731b7ca
commit
34b995998b
1 changed files with 2 additions and 2 deletions
|
@ -232,8 +232,8 @@ function cropCanvas(sourceCanvas, options = {}) {
|
|||
|
||||
bb.x = minx - options.border;
|
||||
bb.y = miny - options.border;
|
||||
bb.w = maxx - minx + 2 * options.border;
|
||||
bb.h = maxy - miny + 2 * options.border;
|
||||
bb.w = maxx - minx + 1 + 2 * options.border;
|
||||
bb.h = maxy - miny + 1 + 2 * options.border;
|
||||
|
||||
if (maxx < 0) throw new NoContentError("Canvas has no content to crop");
|
||||
|
||||
|
|
Loading…
Reference in a new issue