79340662

Date: 2025-01-08 20:27:38
Score: 1
Natty:
Report link

2025 version based on fabric 6.5.4 (typescript) and @VitaliiBratok answer:

import { Point } from 'fabric';

const transformedPoints: Point[] = polygon
      .get('points')
      .map((p: Point) => {
        return new Point(p.x - polygon.pathOffset.x, p.y - polygon.pathOffset.y);
      })
      .map((p: Point) => {
        return p.transform(polygon.calcTransformMatrix());
      });
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @VitaliiBratok
  • Low reputation (0.5):
Posted by: João Victor