How to use the @sketch-hq/sketch-file-format-ts.FileFormat1.PatternFillType 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 / models.ts View on Github external
export const makeImageFill = (
  image: FileFormat.ImageDataRef,
  patternFillType: FileFormat.PatternFillType = FileFormat.PatternFillType.Fill,
): FileFormat.Fill => ({
  _class: 'fill',
  isEnabled: true,
  fillType: FileFormat.FillType.Pattern,
  color: makeColorFromCSS('white'),
  image,
  noiseIndex: 0,
  noiseIntensity: 0,
  patternFillType,
  patternTileScale: 1,
  contextSettings: {
    _class: 'graphicsContextSettings',
    blendMode: FileFormat.BlendMode.Normal,
    opacity: 1,
  },
  gradient: emptyGradient,