Mercurial > MadButterfly
changeset 799:ba6bb69ee419
Fix issue of incorrect top position of bbox.
x of bbox generated by Inkscape is left-bottom corner and relative to
left-bottom corner of page. Up-direction is positive. But, in
previous implement, it assume getting a left-top corner. It is wrong,
and it is fixed, now.
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Tue, 31 Aug 2010 14:54:47 +0800 |
parents | 210e4d24a3ba |
children | 76470d692bb9 |
files | nodejs/svg.js |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/nodejs/svg.js Tue Aug 31 14:52:12 2010 +0800 +++ b/nodejs/svg.js Tue Aug 31 14:54:47 2010 +0800 @@ -269,6 +269,7 @@ a = node.attr("bbox-height"); vstr = a.value(); tgt.bbox_height = parseFloat(vstr); + tgt.bbox_y -= tgt.bbox_height; tgt.center_x = tgt.bbox_width / 2 + tgt.bbox_x; a = node.attr("transform-center-x");