获取选定的SVG元素的边界框 [英] Get the bounding box of a selected SVG element

查看:236
本文介绍了获取选定的SVG元素的边界框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想读:

  • widthheightxy测量结果
  • width,height,x,y measurements

用于特定的SVG元素.

for a particular SVG element.

我认为最简单的方法是获取 最小边界框 首先阅读其属性.

I suppose that easiest way to go about this is to fetch the minimum bounding box first and read it's properties.

我该如何访问?

推荐答案

假设您有该元素的句柄,我认为这会起作用,不是吗?

Assuming you have a handle to the element, I would think that this would work, no?

box = svgedit.utilities.getBBox(selected);

这篇关于获取选定的SVG元素的边界框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆