s_openpl.c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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_begin_page (S___(Plotter *_plotter))
  20. {
  21. int i;
  22. /* initialize `font used' arrays 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. /* copy background color to the SVG-specific part of the SVGPlotter; that
  28. value will be written out at the head of the page (also, it'll be
  29. updated before that, if erase() is invoked) */
  30. _plotter->s_bgcolor = _plotter->drawstate->bgcolor;
  31. _plotter->s_bgcolor_suppressed = _plotter->drawstate->bgcolor_suppressed;
  32. return true;
  33. }