hpdf_gstate.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * << Haru Free PDF Library >> -- hpdf_gstate.h
  3. *
  4. * URL: http://libharu.org
  5. *
  6. * Copyright (c) 1999-2006 Takeshi Kanno <[email protected]>
  7. * Copyright (c) 2007-2009 Antony Dovgal <[email protected]>
  8. *
  9. * Permission to use, copy, modify, distribute and sell this software
  10. * and its documentation for any purpose is hereby granted without fee,
  11. * provided that the above copyright notice appear in all copies and
  12. * that both that copyright notice and this permission notice appear
  13. * in supporting documentation.
  14. * It is provided "as is" without express or implied warranty.
  15. *
  16. */
  17. #ifndef _HPDF_GSTATE_H
  18. #define _HPDF_GSTATE_H
  19. #include "hpdf_font.h"
  20. #ifdef __cplusplus
  21. extern "C" {
  22. #endif
  23. /*----------------------------------------------------------------------------*/
  24. /*------ graphic state stack -------------------------------------------------*/
  25. typedef struct _HPDF_GState_Rec *HPDF_GState;
  26. typedef struct _HPDF_GState_Rec {
  27. HPDF_TransMatrix trans_matrix;
  28. HPDF_REAL line_width;
  29. HPDF_LineCap line_cap;
  30. HPDF_LineJoin line_join;
  31. HPDF_REAL miter_limit;
  32. HPDF_DashMode dash_mode;
  33. HPDF_REAL flatness;
  34. HPDF_REAL char_space;
  35. HPDF_REAL word_space;
  36. HPDF_REAL h_scalling;
  37. HPDF_REAL text_leading;
  38. HPDF_TextRenderingMode rendering_mode;
  39. HPDF_REAL text_rise;
  40. HPDF_ColorSpace cs_fill;
  41. HPDF_ColorSpace cs_stroke;
  42. HPDF_RGBColor rgb_fill;
  43. HPDF_RGBColor rgb_stroke;
  44. HPDF_CMYKColor cmyk_fill;
  45. HPDF_CMYKColor cmyk_stroke;
  46. HPDF_REAL gray_fill;
  47. HPDF_REAL gray_stroke;
  48. HPDF_Font font;
  49. HPDF_REAL font_size;
  50. HPDF_WritingMode writing_mode;
  51. HPDF_GState prev;
  52. HPDF_UINT depth;
  53. } HPDF_GState_Rec;
  54. /*----------------------------------------------------------------------------*/
  55. /*----------------------------------------------------------------------------*/
  56. HPDF_GState
  57. HPDF_GState_New (HPDF_MMgr mmgr,
  58. HPDF_GState current);
  59. HPDF_GState
  60. HPDF_GState_Free (HPDF_MMgr mmgr,
  61. HPDF_GState gstate);
  62. #ifdef __cplusplus
  63. }
  64. #endif /* __cplusplus */
  65. #endif /* _HPDF_GSTATE_H */