Added method to calculate text dimensions(graphicjs.getTextDimensions()).
Added a method to crop the image in a circle.
<canvas id="canvas"></canvas>
import graphicjs from 'graphicjs';
// Crop the image in a circle
const croppedImg = await graphicjs.cropCircle('sample.jpg', { size: 240 });
const canvas = document.querySelector('#canvas');
canvas.width = croppedImg.width;
canvas.height = croppedImg.height;
canvas.getContext('2d').drawImage(croppedImg, 0, 0);
Released.