separation.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef MUPDF_FITZ_SEPARATION_H
  2. #define MUPDF_FITZ_SEPARATION_H
  3. #include "mupdf/fitz/system.h"
  4. #include "mupdf/fitz/context.h"
  5. /*
  6. A fz_separation structure holds details of a set of separations
  7. (such as might be used on within a page of the document).
  8. The app might control the separations by enabling/disabling them,
  9. and subsequent renders would take this into account.
  10. */
  11. enum
  12. {
  13. FZ_MAX_SEPARATIONS = 64
  14. };
  15. typedef struct fz_separations_s fz_separations;
  16. /* Create a new separations structure (initially empty) */
  17. fz_separations *fz_new_separations(fz_context *ctx);
  18. /* Add a reference */
  19. fz_separations *fz_keep_separations(fz_context *ctx, fz_separations *sep);
  20. /* Drop a reference */
  21. void fz_drop_separations(fz_context *ctx, fz_separations *sep);
  22. /* Add a separation (RGBA and CYMK equivalents, null terminated name) */
  23. void fz_add_separation(fz_context *ctx, fz_separations *sep, uint32_t rgba, uint32_t cmyk, char *name);
  24. /* Enable or disable a given separation */
  25. void fz_control_separation(fz_context *ctx, fz_separations *sep, int separation, int disable);
  26. /* Test for a separation being enabled or disabled */
  27. int fz_separation_disabled(fz_context *ctx, fz_separations *sep, int separation);
  28. /* Quick test for all separations enabled (the common case) */
  29. int fz_separations_all_enabled(fz_context *ctx, fz_separations *sep);
  30. /* Read separation details */
  31. const char *fz_get_separation(fz_context *ctx, fz_separations *sep, int separation, uint32_t *rgb, uint32_t *cmyk);
  32. /* Count the number of separations */
  33. int fz_count_separations(fz_context *ctx, fz_separations *sep);
  34. #endif