天下无坑

天下无坑


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

矩形边界

const bound = fbObject.getBoundingRect()
console.log(bound)
// result
{
    left: 150,
    top: 199,
    width: 600,
    height: 113
}

[canvas-arc](https://www.runoob.com/jsref/met-canvas-arc.html "canvas-arc")

M = moveTo 移动 x, y A = Arc 扇形 x, y, r, startAngle, endAngle, counterclockwise L = Line 直线 x, y C = Curve 曲线 cp1x, cp1y, [ cp2x, cp2y, ] x, y

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'
});

SVG 命令含义

页面列表

ITEM_HTML