<commit_before>import Point from 'src/dataStructures/geometry/Point';
import Polygon from 'src/dataStructures/geometry/Polygon';
import ColorOperators from "src/operators/graphic/ColorOperators";
import GeometryOperators from 'src/operators/geometry/GeometryOperators';
import Rectangle from 'src/dataStructures/geometry/Rectangle';
import { TwoPi, HalfPi } from "src/Global";

/**
 * A graphics object provides a surface for drawing and interaction
 * with drawn primitives.
 *
 * The constructor initializes basic configuration and
 * optionally starts the draw cycle.
 *
 * @param {Object} options valid properties described below
 * @param {String|DOMNode|undefined|false} options.container a string selector or reference
 *                                                           to a node where the canvas for this
 *                                                           graphics object will be placed.
 *                                                           If this is a falsy value, then the graphics object
 *                                                           will not be attached to the DOM and can be used as an
 *                                                           offscreen bugger.
 * @param {Object} options.dimensions object with width and height properties to specify
 *                                    the dimensions of the canvas. If this is not passed
 *                                    in, the canvas will grow to always fit the size of its
 *                                    container.
 * @param {Function} options.init custom user function to initialize drawing related
 *                                things. Called once after base initialization.
 * @param {Function} options.cycle custom user function to render each frame. This
 *                                 is called once per frame of the draw loop unless
 *                                 cycleInterval is set to 0.
 * @param {Function} options.onResize custom user function to run on resize of the canvas *
 * @param {Number} options.cycleInterval how often in muilliseconds to run the cycle function
 *                                       if set to zero the cycle function will only run once.
 * @param {Boolean} noLoop if this is true only run the cycle function once,
 * @param {Boolean} noStart if this is true the cycle function will not be automatically started.
 */
function Graphics(options) {
  this.container = options.container;
  if(typeof this.container === 'string') {
    // Assume it is a selector and try and find the actual DOM node
    this.container = document.querySelector(this.container);
  }
  this.dimensions = options.dimensions;



  this.init = options.init || noOperation;
  this.cycle = options.cycle || noOperation;
  this.onResize = options.onResize || noOperation;
  this._cycleInterval = options.cycleInterval === undefined ? 30 : options.cycleInterval;
  if(options.noLoop) {
    this._cycleInterval = 0;
  }

  this._initialize(!options.noStart);
}
export default Graphics;
function noOperation() {}
<commit_msg>fix jsdoc for Graphics class<commit_after>import Point from 'src/dataStructures/geometry/Point';
import Polygon from 'src/dataStructures/geometry/Polygon';
import ColorOperators from "src/operators/graphic/ColorOperators";
import GeometryOperators from 'src/operators/geometry/GeometryOperators';
import Rectangle from 'src/dataStructures/geometry/Rectangle';
import { TwoPi, HalfPi } from "src/Global";

/**
 * @classdesc A graphics object provides a surface for drawing and interaction
 * with drawn primitives.
 *
 * @description Creates a new graphcis object and initializes basic configuration
 * and optionally starts the draw cycle.
 *
 * @param {Object} options valid properties described below
 * @param {String|DOMNode|undefined|false} options.container a string selector or reference
 *                                                           to a node where the canvas for this
 *                                                           graphics object will be placed.
 *                                                           If this is a falsy value, then the graphics object
 *                                                           will not be attached to the DOM and can be used as an
 *                                                           offscreen bugger.
 * @param {Object} options.dimensions object with width and height properties to specify
 *                                    the dimensions of the canvas. If this is not passed
 *                                    in, the canvas will grow to always fit the size of its
 *                                    container.
 * @param {Function} options.init custom user function to initialize drawing related
 *                                things. Called once after base initialization.
 * @param {Function} options.cycle custom user function to render each frame. This
 *                                 is called once per frame of the draw loop unless
 *                                 cycleInterval is set to 0.
 * @param {Function} options.onResize custom user function to run on resize of the canvas *
 * @param {Number} options.cycleInterval how often in muilliseconds to run the cycle function
 *                                       if set to zero the cycle function will only run once.
 * @param {Boolean} noLoop if this is true only run the cycle function once,
 * @param {Boolean} noStart if this is true the cycle function will not be automatically started.
 * 
 * @constructor
 * @category drawing
 */
function Graphics(options) {
  this.container = options.container;
  if(typeof this.container === 'string') {
    // Assume it is a selector and try and find the actual DOM node
    this.container = document.querySelector(this.container);
  }
  this.dimensions = options.dimensions;



  this.init = options.init || noOperation;
  this.cycle = options.cycle || noOperation;
  this.onResize = options.onResize || noOperation;
  this._cycleInterval = options.cycleInterval === undefined ? 30 : options.cycleInterval;
  if(options.noLoop) {
    this._cycleInterval = 0;
  }

  this._initialize(!options.noStart);
}
export default Graphics;
function noOperation() {}

{'fraction_non_alphanumeric': 0.06582319026265214, 'fraction_numerical': 0.0012812299807815502, 'mean_word_length': 2.096182449181953, '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': 36, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5976229', 'n_tokens_mistral': 1384, 'n_tokens_neox': 1348, 'n_words': 591}