How to use the textures.paths function in textures

To help you get started, we’ve selected a few textures 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 finnfiddle / react-svg-textures / src / Paths.js View on Github external
generate() {
    const t = textures.paths();
    [
      'size',
      'strokeWidth',
      'shapeRendering',
      'stroke',
      'background',
      'id',
      'd',
    ].forEach((key) => {
      if (this.props[key]) t[key](this.props[key]);
    });
    const selection = new Selection();
    t(selection);

    this.setState({
      pattern: selection.toReact(this.props.components),
github govau / performance-dashboard / client / src / _dashboard-legacy / Helpers / createPatterns.js View on Github external
t = textures
          .lines()
          .thicker()
          .strokeWidth(1)
          .stroke(d3.rgb(c).brighter(0.6))
          .background(c);
        break;
      case 1:
        t = textures
          .circles()
          .fill(d3.rgb(c).brighter(0.6))
          .thicker()
          .background(c);
        break;
      case 2:
        t = textures
          .paths()
          .d('crosses')
          .stroke(d3.rgb(c).brighter(0.6))
          .background(c)
          .lighter()
          .thicker();
        break;
      case 3:
        t = textures
          .paths()
          .d('waves')
          .thicker()
          .strokeWidth(1)
          .stroke(d3.rgb(c).brighter(0.6))
          .background(c);
        break;