libcm is a C development framework with an emphasis on audio signal processing applications.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cmSvgWriter.h 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef cmSvgWriter_h
  2. #define cmSvgWriter_h
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. //( { file_desc:"SVG file writer." kw[file plot] }
  7. enum
  8. {
  9. kOkSvgRC = cmOkRC,
  10. kFileFailSvgRC,
  11. kPrintFailSvgRC,
  12. kLHeapFailSvgRC
  13. };
  14. typedef cmRC_t cmSvgRC_t;
  15. typedef cmHandle_t cmSvgH_t;
  16. extern cmSvgH_t cmSvgNullHandle;
  17. cmSvgRC_t cmSvgWriterAlloc( cmCtx_t* ctx, cmSvgH_t* hp );
  18. cmSvgRC_t cmSvgWriterFree( cmSvgH_t* hp );
  19. bool cmSvgWriterIsValid( cmSvgH_t h );
  20. cmSvgRC_t cmSvgWriterRect( cmSvgH_t h, double x, double y, double ww, double hh, const cmChar_t* cssClassLabel );
  21. cmSvgRC_t cmSvgWriterLine( cmSvgH_t h, double x0, double y0, double x1, double y1, const cmChar_t* cssClassLabel );
  22. cmSvgRC_t cmSvgWriterText( cmSvgH_t h, double x, double y, const cmChar_t* text, const cmChar_t* cssClassLabel );
  23. // Write the SVG file. Note that header on this file references the CSS file 'cssFn'
  24. // and the Javascript file svg-pan-zoom.min.js from https://github.com/ariutta/svg-pan-zoom.
  25. // Both the CSS file and svg-pan-zoom.min.js should therefore be in the same directory
  26. // as the output HTML file.
  27. cmSvgRC_t cmSvgWriterWrite( cmSvgH_t h, const cmChar_t* cssFn, const cmChar_t* outFn, bool standaloneFl, bool panZoomFl );
  28. //)
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #endif