home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / printing / ghostscrip / source / _gs / h / gxpath < prev    next >
Encoding:
Text File  |  1991-10-27  |  3.1 KB  |  77 lines

  1. /* Copyright (C) 1989, 1990 Aladdin Enterprises.  All rights reserved.
  2.    Distributed by Free Software Foundation, Inc.
  3.  
  4. This file is part of Ghostscript.
  5.  
  6. Ghostscript is distributed in the hope that it will be useful, but
  7. WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. to anyone for the consequences of using it or for whether it serves any
  9. particular purpose or works at all, unless he says so in writing.  Refer
  10. to the Ghostscript General Public License for full details.
  11.  
  12. Everyone is granted permission to copy, modify and redistribute
  13. Ghostscript, but only under the conditions described in the Ghostscript
  14. General Public License.  A copy of this license is supposed to have been
  15. given to you along with Ghostscript so you can know your rights and
  16. responsibilities.  It should be in a file named COPYING.  Among other
  17. things, the copyright notice and this notice must be preserved on all
  18. copies.  */
  19.  
  20. /* gxpath.h */
  21. /* Lower-level path routines for GhostScript library */
  22. /* Requires gxfixed.h */
  23.  
  24. /* The routines and types in this interface all use */
  25. /* device, rather than user, coordinates, and almost all */
  26. /* use fixed-point, rather than floating, representation. */
  27.  
  28. /* Opaque type for a path */
  29. typedef struct gx_path_s gx_path;
  30. #ifndef ARC
  31. /* The Archimedes linker will look for this, and it doesn't exist */
  32. extern const uint gs_path_sizeof;
  33. #endif
  34.  
  35. /* Opaque type for a path enumerator */
  36. typedef struct gx_path_enum_s gx_path_enum;
  37. #ifndef ARC
  38. /* The Archimedes linker will look for this, and it doesn't exist */
  39. extern const uint gx_path_enum_sizeof;
  40. #endif
  41.  
  42. /* Define the two insideness rules */
  43. #define gx_rule_winding_number (-1)
  44. #define gx_rule_even_odd 1
  45.  
  46. /* Path constructors.  Note that the only procedure that involves */
  47. /* a graphics state is gx_path_init. */
  48. extern    void    gx_path_init(P2(gx_path *, gs_memory_procs *)),
  49.         gx_path_release(P1(gx_path *)),
  50.         gx_path_share(P1(gx_path *));
  51. extern    int    gx_path_add_point(P3(gx_path *, fixed, fixed)),
  52.         gx_path_add_relative_point(P3(gx_path *, fixed, fixed)),
  53.         gx_path_add_line(P3(gx_path *, fixed, fixed)),
  54.         gx_path_add_rectangle(P5(gx_path *, fixed, fixed, fixed, fixed)),
  55.         gx_path_add_pgram(P7(gx_path *, fixed, fixed, fixed, fixed, fixed, fixed)),
  56.         gx_path_add_curve(P7(gx_path *, fixed, fixed, fixed, fixed, fixed, fixed)),
  57.         gx_path_add_arc(P7(gx_path *, fixed, fixed, fixed, fixed, fixed, fixed)),
  58.         gx_path_close_subpath(P1(gx_path *));
  59.  
  60. /* Path accessors and transformers */
  61. extern    int    gx_path_current_point(P2(gx_path *, gs_fixed_point *)),
  62.         gx_path_bbox(P2(gx_path *, gs_fixed_rect *)),
  63.         gx_path_has_curves(P1(gx_path *)),
  64.         gx_path_is_void(P1(gx_path *)),
  65.         gx_path_is_rectangle(P2(gx_path *, gs_fixed_rect *)),
  66.         gx_cpath_box_for_check(P2(gx_path *, gs_fixed_rect *)),
  67.         gx_cpath_includes_rectangle(P5(gx_path *, fixed, fixed, fixed, fixed)),
  68.         gx_path_copy(P2(gx_path * /*old*/, gx_path * /*to*/)),
  69.         gx_path_flatten(P3(gx_path * /*old*/, gx_path * /*new*/, floatp)),
  70.         gx_path_merge(P2(gx_path * /*from*/, gx_path * /*to*/)),
  71.         gx_path_translate(P3(gx_path *, fixed, fixed));
  72.  
  73. /* Debugging routines */
  74. #ifdef DEBUG
  75. extern    void    gx_path_print(P1(gx_path *));
  76. #endif
  77.