g_path.c 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* This file is part of the GNU plotutils package. Copyright (C) 1995,
  2. 1996, 1997, 1998, 1999, 2000, 2005, 2008, Free Software Foundation, Inc.
  3. The GNU plotutils package is free software. You may redistribute it
  4. and/or modify it under the terms of the GNU General Public License as
  5. published by the Free Software foundation; either version 2, or (at your
  6. option) any later version.
  7. The GNU plotutils package is distributed in the hope that it will be
  8. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. General Public License for more details.
  11. You should have received a copy of the GNU General Public License along
  12. with the GNU plotutils package; see the file COPYING. If not, write to
  13. the Free Software Foundation, Inc., 51 Franklin St., Fifth Floor,
  14. Boston, MA 02110-1301, USA. */
  15. /* This file contains the internal paint_path() and paint_paths() methods,
  16. which the public method endpath() is a wrapper around. */
  17. /* This file also contains the internal path_is_flushable() method, which
  18. is invoked after any path segment is added to the segment list, provided
  19. (0) the segment list has become greater than or equal to the
  20. `max_unfilled_path_length' Plotter parameter, (1) the path isn't to be
  21. filled. In most Plotters, this operation simply returns true. */
  22. /* This file also contains the internal maybe_prepaint_segments() method.
  23. It is called immediately after any segment is added to a path. Some
  24. Plotters, at least under some circumstances, treat endpath() as a no-op,
  25. and plot the segments of a path in real time, instead. They accomplish
  26. this by overloading this method. */
  27. #include "sys-defines.h"
  28. #include "extern.h"
  29. /* In a generic Plotter, paint_path() does nothing. */
  30. void
  31. _pl_g_paint_path (S___(Plotter *_plotter))
  32. {
  33. return;
  34. }
  35. /* In a generic Plotter, path_is_flushable() simply returns true. */
  36. bool
  37. _pl_g_path_is_flushable (S___(Plotter *_plotter))
  38. {
  39. return true;
  40. }
  41. /* In a generic Plotter, maybe_prepaint_segments() does nothing. */
  42. void
  43. _pl_g_maybe_prepaint_segments (R___(Plotter *_plotter) int prev_num_segments)
  44. {
  45. return;
  46. }
  47. /* In a generic Plotter, paint_paths() does nothing but returns `true'. */
  48. bool
  49. _pl_g_paint_paths (S___(Plotter *_plotter))
  50. {
  51. return true;
  52. }