Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. /* Structure for data supplied in halftone call back */
  2. typedef struct ipa_halftone_data_s {
  3. const unsigned char *data;
  4. int offset_x;
  5. unsigned int raster;
  6. int x;
  7. int y;
  8. unsigned int w;
  9. unsigned int h;
  10. unsigned int plane_raster;
  11. } ipa_halftone_data_t;
  12.  
  13. /* Opaque type for halftone instance */
  14. typedef struct ipa_halftone_s ipa_halftone;
  15.  
  16. typedef struct ipa_matrix_s {
  17. float xx; float xy;
  18. float yx; float yy;
  19. float tx; float ty;
  20. } ipa_matrix;
  21.  
  22. typedef void (ipa_ht_callback_t)(ipa_halftone_data_t *data, void *args);
  23.  
  24. /* Initialize a halftone instance. */
  25. ipa_halftone *ipa_halftone_init(ipa_context *ctx,
  26. void *opaque,
  27. int x,
  28. int y,
  29. unsigned int w,
  30. unsigned int h,
  31. const ipa_matrix *mat,
  32. unsigned int num_planes,
  33. unsigned char *cache,
  34. int clip_x,
  35. int clip_y,
  36. unsigned int clip_w,
  37. unsigned int clip_h,
  38. ipa_ht_callback_t *callback,
  39. void *callback_arg);
  40.  
  41. /* Set a screen for a colorant. */
  42. int ipa_halftone_add_screen(ipa_context *ctx, void *opaque, ipa_halftone *ht,
  43. int invert, unsigned short width, unsigned short height, int phase,
  44. unsigned char *values);
  45.  
  46. /* Halftone some data. */
  47. int ipa_halftone_process_planar(ipa_halftone *ht,
  48. void *opaque,
  49. const unsigned char **buffer);
  50.  
  51. int ipa_halftone_process_chunky(ipa_halftone *ht,
  52. void *opaque,
  53. const unsigned char **buffer);
  54.  
  55. /* Finalize a halftone instance. */
  56. void ipa_halftone_fin(ipa_halftone *, void *opaque);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement