<commit_before>#ifndef _CANVASELEMENT_H_
#define _CANVASELEMENT_H_

#include <Element.h>
#include <TextureRef.h>
 
class CanvasElement : public Element {
 public:
  CanvasElement() { }

  void setX(float _x) { x = _x; }
  void setY(float _y) { y = _y; }
  void setWidth(float _width) { width = _width; }
  void setHeight(float _height) { height = _height; }

  void onDrawEvent(DrawEvent & ev) {
    if (!texture.get()) {

    }
  }

  virtual void draw() = 0;
  
 private:
  float x = 0, y = 0, width = 0, height = 0;
  canvas::TextureRef texture;
};

#endif<commit_msg>include Context.h, rename draw() to drawContent(), disable drawContent(), make dimensions protected<commit_after>#ifndef _CANVASELEMENT_H_
#define _CANVASELEMENT_H_

#include <Element.h>
#include <TextureRef.h>
#include <Context.h>
 
class CanvasElement : public Element {
 public:
  CanvasElement() { }

  void setX(float _x) { x = _x; }
  void setY(float _y) { y = _y; }
  void setWidth(float _width) { width = _width; }
  void setHeight(float _height) { height = _height; }

  void onDrawEvent(DrawEvent & ev) {
#if 0
    if (!texture.get()) {
      texture = drawContent();
    }
#endif
  }

 protected:
  // virtual canvas::TextureRef drawContent() = 0;

  float x = 0, y = 0, width = 0, height = 0;
  
 private:
  canvas::TextureRef texture;
  // canvas::ContextFactory factory;
};

#endif
{'fraction_non_alphanumeric': 0.13323572474377746, 'fraction_numerical': 0.008052708638360176, 'mean_word_length': 3.6975945017182132, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '2229763', 'n_tokens_mistral': 502, 'n_tokens_neox': 481, 'n_words': 131}