s_erase.c 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* This file is part of the GNU plotutils package. Copyright (C) 1995,
  2. 1996, 1997, 1998, 1999, 2000, 2005, 2008, 2009, Free Software
  3. Foundation, Inc.
  4. The GNU plotutils package is free software. You may redistribute it
  5. and/or modify it under the terms of the GNU General Public License as
  6. published by the Free Software foundation; either version 2, or (at your
  7. option) any later version.
  8. The GNU plotutils package is distributed in the hope that it will be
  9. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. General Public License for more details.
  12. You should have received a copy of the GNU General Public License along
  13. with the GNU plotutils package; see the file COPYING. If not, write to
  14. the Free Software Foundation, Inc., 51 Franklin St., Fifth Floor,
  15. Boston, MA 02110-1301, USA. */
  16. #include "sys-defines.h"
  17. #include "extern.h"
  18. bool
  19. _pl_s_erase_page (S___(Plotter *_plotter))
  20. {
  21. int i;
  22. /* reinitialize `font used' array(s) for this page */
  23. for (i = 0; i < PL_NUM_PS_FONTS; i++)
  24. _plotter->data->page->ps_font_used[i] = false;
  25. for (i = 0; i < PL_NUM_PCL_FONTS; i++)
  26. _plotter->data->page->pcl_font_used[i] = false;
  27. /* reset page-specific SVGPlotter variables, as if the page had just been
  28. opened */
  29. _plotter->s_matrix[0] = 1.0;/* dummy matrix values */
  30. _plotter->s_matrix[1] = 0.0;
  31. _plotter->s_matrix[2] = 0.0;
  32. _plotter->s_matrix[3] = 1.0;
  33. _plotter->s_matrix[4] = 0.0;
  34. _plotter->s_matrix[5] = 0.0;
  35. _plotter->s_matrix_is_unknown = true;
  36. _plotter->s_matrix_is_bogus = false;
  37. /* update our knowledge of what SVG's background color should be (we'll
  38. use it when we write the SVG page header) */
  39. _plotter->s_bgcolor = _plotter->drawstate->bgcolor;
  40. _plotter->s_bgcolor_suppressed = _plotter->drawstate->bgcolor_suppressed;
  41. return true;
  42. }