<commit_before><commit_msg>adding Rect class<commit_after>/// <reference path="Vector2D.ts" />
/// <reference path="Shape.ts" />

module cnvs {

  export interface RectOptions extends ShapeOptions {
    width: number
    height: number
  }

  export class Rect extends Shape {
    
    width: number
    height: number

    constructor (options: RectOptions) {
      super(options) 
        this.width = options.width
        this.height = options.height
    }

    render (ctx: any) {
      super.render(ctx)
      ctx.rect(this.position.x, this.position.y, this.width, this.height);
      ctx.fill();
      ctx.stroke();
    }

  }

}

{'fraction_non_alphanumeric': 0.12244897959183673, 'fraction_numerical': 0.0015698587127158557, 'mean_word_length': 2.467391304347826, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5139263', 'n_tokens_mistral': 201, 'n_tokens_neox': 192, 'n_words': 45}