I am scaling a polygon and set the actual scaled points into the pathArray
const pointsCal = this.findPoints(allocatedTable.tableType.shape.pathArray);//calculating max x,y min x,y of pathArray const diameterX = (pointsCal.highX - pointsCal.lowX)/2; const diameterY = (pointsCal.highY - pointsCal.lowX)/2; const scalex = (diameterX + this.settings.tableTableSpace) / diameterX; const scaleY = (diameterY + this.settings.tableTableSpace) / diameterY; pathArray.forEach((point) => { if (point.command !== 'z') { point.x -= tableCenterPoint.x; point.y -= tableCenterPoint.y; point.x *= scalex; point.y *= scaleY; point.x += tableCenterPoint.x; point.y += tableCenterPoint.y;[enter image description here][1] } }); but for the regular rectangle it is working properly but for the rotated Shapes it is not scling propely
I think I had made a mistake in logic in calculating scale X and scaleY value