-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-
/*
- * (GLABELS) Label and Business Card Creation program for GNOME
- *
- * print.c: Print module
+ * print.c
+ * Copyright (C) 2001-2009 Jim Evins <evins@snaught.com>.
*
- * Copyright (C) 2001-2007 Jim Evins <evins@snaught.com>.
+ * This file is part of gLabels.
*
- * This program is free software; you can redistribute it and/or modify
+ * gLabels is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful,
+ * gLabels is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with gLabels. If not, see <http://www.gnu.org/licenses/>.
*/
+
#include <config.h>
#include "print.h"
#include <time.h>
#include <ctype.h>
+#include <libglabels/libglabels.h>
#include "label.h"
-#include <libglabels/template.h>
#include "cairo-label-path.h"
#include "debug.h"
+
/*===========================================*/
/* Private macros and constants. */
/*===========================================*/
#define TICK_OFFSET 2.25
#define TICK_LENGTH 18.0
+
/*=========================================================================*/
/* Private types. */
/*=========================================================================*/
glLabel *label);
-\f
/*****************************************************************************/
/* Print simple sheet (no merge data) command. */
/*****************************************************************************/
gl_debug (DEBUG_PRINT, "END");
}
+
/*****************************************************************************/
/* Print collated merge sheet command */
/*****************************************************************************/
gl_debug (DEBUG_PRINT, "END");
}
+
/*****************************************************************************/
/* Print uncollated merge sheet command */
/*****************************************************************************/
gl_debug (DEBUG_PRINT, "END");
}
+
/*---------------------------------------------------------------------------*/
/* PRIVATE. new print info structure */
/*---------------------------------------------------------------------------*/
return pi;
}
+
/*---------------------------------------------------------------------------*/
/* PRIVATE. free print info structure */
/*---------------------------------------------------------------------------*/
gl_debug (DEBUG_PRINT, "END");
}
+
/*---------------------------------------------------------------------------*/
/* PRIVATE. Print crop tick marks. */
/*---------------------------------------------------------------------------*/
gl_debug (DEBUG_PRINT, "END");
}
+
/*---------------------------------------------------------------------------*/
/* PRIVATE. Print i'th label. */
/*---------------------------------------------------------------------------*/
/* Transform coordinate system to be relative to upper corner */
/* of the current label */
cairo_translate (pi->cr, x, y);
+
+ clip_to_outline (pi, label);
+
+ cairo_save (pi->cr);
+
+ /* Special transformations. */
if (label->rotate_flag) {
gl_debug (DEBUG_PRINT, "Rotate flag set");
cairo_rotate (pi->cr, -M_PI/2.0);
cairo_scale (pi->cr, -1.0, 1.0);
}
- clip_to_outline (pi, label);
gl_label_draw (label, pi->cr, FALSE, record);
+
+ cairo_restore (pi->cr); /* From special transformations. */
+
if (outline_flag) {
draw_outline (pi, label);
}
- cairo_restore (pi->cr);
+ cairo_restore (pi->cr); /* From translation. */
gl_debug (DEBUG_PRINT, "END");
}
+
/*---------------------------------------------------------------------------*/
/* PRIVATE. Draw outline. */
/*---------------------------------------------------------------------------*/
gl_debug (DEBUG_PRINT, "END");
}
+
/*---------------------------------------------------------------------------*/
/* PRIVATE. Clip to outline. */
/*---------------------------------------------------------------------------*/
gl_debug (DEBUG_PRINT, "END");
}
+
+
+
+
+/*
+ * Local Variables: -- emacs
+ * mode: C -- emacs
+ * c-basic-offset: 8 -- emacs
+ * tab-width: 8 -- emacs
+ * indent-tabs-mode: nil -- emacs
+ * End: -- emacs
+ */