How to use the @sketch-hq/sketch-file-format-ts.FileFormat1.CurveMode function in @sketch-hq/sketch-file-format-ts

To help you get started, we’ve selected a few @sketch-hq/sketch-file-format-ts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github airbnb / react-sketchapp / src / jsonUtils / shapeLayers.ts View on Github external
},
      {
        _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}',
      },
    ],
  };
};
github airbnb / react-sketchapp / src / jsonUtils / shapeLayers.ts View on Github external
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}',
      },
      {