SvgBackend.h 570 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include "Backend.h"
  3. #include "../closure.h"
  4. #include <v8.h>
  5. class SvgBackend : public Backend
  6. {
  7. private:
  8. cairo_surface_t* createSurface();
  9. cairo_surface_t* recreateSurface();
  10. public:
  11. PdfSvgClosure* _closure = NULL;
  12. inline PdfSvgClosure* closure() { return _closure; }
  13. SvgBackend(int width, int height);
  14. ~SvgBackend();
  15. static Backend *construct(int width, int height);
  16. static Nan::Persistent<v8::FunctionTemplate> constructor;
  17. static void Initialize(v8::Local<v8::Object> target);
  18. static NAN_METHOD(New);
  19. };