<commit_before>// Vex Flow
// <NAME> <<EMAIL>>
//
// A rendering context for the Raphael backend.
//
// Copyright <NAME> 2010

/** @constructor */
Vex.Flow.RaphaelContext = function(element) {
  if (arguments.length > 0) this.init(element)
}

Vex.Flow.RaphaelContext.prototype.init = function(element) {
  this.element = element;
  this.paper = Raphael(element);
  this.path = "";
  this.pen = {x: 0, y: 0};

  this.state = {
    scale: { x: 1, y: 1 },
    font_family: "Arial",
    font_size: 8,
    font_weight: 800
  };

  this.attributes = {
    "stroke-width": 0.3,
    "fill": "black",
    "font": "10pt Arial"
  };

  this.background_attributes = {
    "stroke-width": 0,
    "fill": "white",
    "font": "10pt Arial"
  };

  this.state_stack= [];
}

Vex.Flow.RaphaelContext.prototype.setFont = function(family, size, weight) {
  this.state.font_family = family;
  this.state.font_size = size;
  this.state.font_weight = weight;
  this.attributes.font = (this.state.font_weight || "") + " " +
    (this.state.font_size * this.state.scale.x) + "pt " +
    this.state.font_family;
  return this;
}

Vex.Flow.RaphaelContext.prototype.setFillStyle = function(style) {
  this.attributes.fill = style;
  return this;
}

Vex.Flow.RaphaelContext.prototype.setBackgroundFillStyle = function(style) {
  this.background_attributes.fill = style;
  return this;
}

Vex.Flow.RaphaelContext.prototype.setStrokeStyle = function(style) {
  this.attributes.stroke = style;
  return this;
}

Vex.Flow.RaphaelContext.prototype.scale = function(x, y) {
  this.state.scale = { x: x, y: y };
  this.attributes.scale = x + "," + y + ",0,0";
  this.attributes.font = this.state.font_size * this.state.scale.x + "pt " +
    this.state.font_family;
  this.background_attributes.scale = x + "," + y + ",0,0";
  this.background_attributes.font = this.state.font_size * this.state.scale.x + "pt " +
    this.state.font_family;<commit_msg>Specifically set stroke color for SVG.<commit_after>// Vex Flow
// <NAME> <<EMAIL>>
//
// A rendering context for the Raphael backend.
//
// Copyright <NAME> 2010

/** @constructor */
Vex.Flow.RaphaelContext = function(element) {
  if (arguments.length > 0) this.init(element)
}

Vex.Flow.RaphaelContext.prototype.init = function(element) {
  this.element = element;
  this.paper = Raphael(element);
  this.path = "";
  this.pen = {x: 0, y: 0};

  this.state = {
    scale: { x: 1, y: 1 },
    font_family: "Arial",
    font_size: 8,
    font_weight: 800
  };

  this.attributes = {
    "stroke-width": 0.3,
    "fill": "black",
    "stroke": "black",
    "font": "10pt Arial"
  };

  this.background_attributes = {
    "stroke-width": 0,
    "fill": "white",
    "stroke": "white",
    "font": "10pt Arial"
  };

  this.state_stack= [];
}

Vex.Flow.RaphaelContext.prototype.setFont = function(family, size, weight) {
  this.state.font_family = family;
  this.state.font_size = size;
  this.state.font_weight = weight;
  this.attributes.font = (this.state.font_weight || "") + " " +
    (this.state.font_size * this.state.scale.x) + "pt " +
    this.state.font_family;
  return this;
}

Vex.Flow.RaphaelContext.prototype.setFillStyle = function(style) {
  this.attributes.fill = style;
  return this;
}

Vex.Flow.RaphaelContext.prototype.setBackgroundFillStyle = function(style) {
  this.background_attributes.fill = style;
  this.background_attributes.stroke = style;
  return this;
}

Vex.Flow.RaphaelContext.prototype.setStrokeStyle = function(style) {
  this.attributes.stroke = style;
  return this;
}

Vex.Flow.RaphaelContext.prototype.scale = function(x, y) {
  this.state.scale = { x: x, y: y };
  this.attributes.scale = x + "," + y + ",0,0";
  this.attributes.font = this.state.font_size * this.state.scale.x + "pt " +
    this.state.font_family;
  this.background_attributes.scale = x + "," + y + ",0,0";
  this.background_attributes.font = this.state.font_size * this.state.scale.x + "pt " +
    this.state.font_family;
{'fraction_non_alphanumeric': 0.1639635073492144, 'fraction_numerical': 0.012164216928535226, 'mean_word_length': 3.4248878923766815, 'pattern_counts': {'":': 14, '<': 11, '<?xml version=': 0, '>': 13, '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': '3180411', 'n_tokens_mistral': 1465, 'n_tokens_neox': 1416, 'n_words': 260}