Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
{
_class: 'curvePoint',
cornerRadius: r2,
curveFrom: '{1, 1}',
curveMode: FileFormat.CurveMode.Straight,
curveTo: '{1, 1}',
hasCurveFrom: false,
hasCurveTo: false,
point: '{1, 1}',
},
{
_class: 'curvePoint',
cornerRadius: r3,
curveFrom: '{0, 1}',
curveMode: FileFormat.CurveMode.Straight,
curveTo: '{0, 1}',
hasCurveFrom: false,
hasCurveTo: false,
point: '{0, 1}',
},
],
};
};
export const makeRectPath = (
radii: Radii = [0, 0, 0, 0],
): Pick => {
const [r0, r1, r2, r3] = radii;
return {
isClosed: true,
points: [
{
_class: 'curvePoint',
cornerRadius: r0,
curveFrom: '{0, 0}',
curveMode: FileFormat.CurveMode.Straight,
curveTo: '{0, 0}',
hasCurveFrom: false,
hasCurveTo: false,
point: '{0, 0}',
},
{
_class: 'curvePoint',
cornerRadius: r1,
curveFrom: '{1, 0}',
curveMode: FileFormat.CurveMode.Straight,
curveTo: '{1, 0}',
hasCurveFrom: false,
hasCurveTo: false,
point: '{1, 0}',
},
{