<commit_before>import _ from "underscore"
import { Moveable, Styleable } from "../mixins"
import Anchor from '../anchor'
import Vector from '../vector'
import Polygon from './polygon'
import Utils from '../utils'

class Path {

  constructor(x, y) {
    this.moveable();
    this.styleable();
    this.vars.anchors = [];
    if(!_.isUndefined(x)) this.vars.x = x;
    if(!_.isUndefined(y)) this.vars.y = y;
  }

  moveTo(x, y, relative) {
    this.vars.anchors.push(new Anchor().setMove(x, y, relative));
    return this;
  }

  lineTo(x, y, relative) {
    this.checkStartMove();
    this.vars.anchors.push(new Anchor().setLine(x, y, relative));
    return this;
  }

  curveTo(a, b, c, d, e, f, g) {
    this.checkStartMove();
    this.vars.anchors.push(new Anchor().setCurve(a, b, c, d, e, f, g));<commit_msg>Update path.js<commit_after>import _ from "underscore"
import { Moveable, Styleable } from "../mixins"
import Anchor from '../anchor'
import Vector from '../vector'
import Polygon from './polygon'
import Utils from '../utils'

class Path {

  constructor(x, y) {
    this.moveable();
    this.styleable();
    this.vars.anchors = [];
    if(!_.isUndefined(x)) this.vars.x = x;
    if(!_.isUndefined(y)) this.vars.y = y;
  }

  moveTo(x, y) {
    this.vars.anchors.push(new Anchor().setMove(x, y));
    return this;
  }

  lineTo(x, y) {
    this.checkStartMove();
    this.vars.anchors.push(new Anchor().setLine(x, y));
    return this;
  }

  curveTo(a, b, c, d, e, f) {
    this.checkStartMove();
    this.vars.anchors.push(new Anchor().setCurve(a, b, c, d, e, f));
{'fraction_non_alphanumeric': 0.181760607979734, 'fraction_numerical': 0.0, 'mean_word_length': 3.1688654353562007, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7106061', 'n_tokens_mistral': 594, 'n_tokens_neox': 585, 'n_words': 138}