P.cleanPathObject = function () {
this.dirtyPathObject = false;
if (!this.noPathUpdates || !this.pathObject) {
this.calculateInterception();
const { currentStampHandlePosition:handle, currentScale:scale, outerCircleStart:ocs, outerCircleEnd:oce, innerCircleStart:ics, innerCircleEnd:ice, drawOuterCircle, displayIntersect } = this;
let { currentOuterRadius:oR, currentInnerRadius:iR, currentDisplacement:disp } = this;
const p = this.pathObject = new Path2D();
oR *= scale;
iR *= scale;
disp *= scale;
const x = oR - (handle[0] * scale),
y = oR - (handle[1] * scale);
if (drawOuterCircle) {
p.arc(x, y, oR, ocs, oce);
p.closePath();
this.pathObjectOuter = false;
this.pathObjectInner = false;
}
else {
const pOuter = this.pathObjectOuter = new Path2D();
const pInner = this.pathObjectInner = new Path2D();
if (displayIntersect) p.arc(x, y, oR, ocs, oce);
else p.arc(x, y, oR, ocs, oce, true);
p.arc(x + disp, y, iR, ics, ice);
p.closePath();
pOuter.arc(x, y, oR, ocs, oce, true);
pOuter.closePath();
pInner.arc(x + disp, y, iR, ics, ice);
pInner.closePath();
}
}
};