天下无坑

天下无坑


fabric.Path + 获取fb对象在画布中的矩形边界

<p>矩形边界</p> <pre><code class="language-javascript">const bound = fbObject.getBoundingRect() console.log(bound) // result { left: 150, top: 199, width: 600, height: 113 }</code></pre> <p><a href="https://www.runoob.com/jsref/met-canvas-arc.html" title="canvas-arc">canvas-arc</a></p> <p>M = moveTo 移动 x, y A = Arc 扇形 x, y, r, startAngle, endAngle, counterclockwise L = Line 直线 x, y C = Curve 曲线 cp1x, cp1y, [ cp2x, cp2y, ] x, y</p> <pre><code>var canvas = new fabric.Canvas('canvas'); var p = new fabric.Path('M 0 100 A 70 70 20 0 3 130 C 200 100 250 50 300 100', { left: 200, top: 60, strokeWidth: 2, fill: '#abcdef' }); </code></pre> <h3>SVG 命令含义</h3> <p><img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/cdc70a6b80468c64cf9a95868ef1547d" alt="" /></p>

页面列表

ITEM_HTML