CVSolidElement.js 1.2 KB

123456789101112131415161718192021222324252627282930
  1. import {
  2. extendPrototype,
  3. } from '../../utils/functionExtensions';
  4. import RenderableElement from '../helpers/RenderableElement';
  5. import BaseElement from '../BaseElement';
  6. import TransformElement from '../helpers/TransformElement';
  7. import HierarchyElement from '../helpers/HierarchyElement';
  8. import FrameElement from '../helpers/FrameElement';
  9. import CVBaseElement from './CVBaseElement';
  10. import IImageElement from '../ImageElement';
  11. import SVGShapeElement from '../svgElements/SVGShapeElement';
  12. function CVSolidElement(data, globalData, comp) {
  13. this.initElement(data, globalData, comp);
  14. }
  15. extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);
  16. CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;
  17. CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
  18. CVSolidElement.prototype.renderInnerContent = function () {
  19. // var ctx = this.canvasContext;
  20. this.globalData.renderer.ctxFillStyle(this.data.sc);
  21. // ctx.fillStyle = this.data.sc;
  22. this.globalData.renderer.ctxFillRect(0, 0, this.data.sw, this.data.sh);
  23. // ctx.fillRect(0, 0, this.data.sw, this.data.sh);
  24. //
  25. };
  26. export default CVSolidElement;