* data/templates/Makefile.am:
* data/templates/brother-other-templates.xml:
Added brother templates.
* src/cairo-markup-path.c: (gl_cairo_markup_margin_rect_path),
(gl_cairo_markup_margin_cd_path):
* src/view.c: (draw_markup_layer):
Fixed markup drawing errors when label is rotated.
git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/branches/glabels-2_2@761
f5e0f49d-192f-0410-a22d-
a8d8700d0965
+2008-03-15 Jim Evins <evins@snaught.com>
+
+ * data/templates/Makefile.am:
+ * data/templates/brother-other-templates.xml:
+ Added brother templates.
+ * src/cairo-markup-path.c: (gl_cairo_markup_margin_rect_path),
+ (gl_cairo_markup_margin_cd_path):
+ * src/view.c: (draw_markup_layer):
+ Fixed markup drawing errors when label is rotated.
+
2008-03-03 Jim Evins <evins@snaught.com>
* configure.in:
avery-iso-templates.xml \
avery-other-templates.xml \
zweckform-iso-templates.xml \
+ brother-other-templates.xml \
misc-us-templates.xml \
misc-iso-templates.xml \
misc-other-templates.xml
--- /dev/null
+<?xml version="1.0"?>
+<Glabels-templates xmlns="http://snaught.com/glabels/2.2/">
+
+ <!--
+ *********************************************************************
+ *********************************************************************
+ Labels for the Brother QL-500/550/650 PC Label Printers
+
+ These templates work with the Brother Linux Printer CUPS Driver. It
+ is unknown if these work correctly with the foomatic print driver for
+ these printers.
+
+ One difference from typical templates is that the template size is
+ not the actual media size - it is the size of the printable area,
+ which is smaller than the media size. This is because (at least with
+ the Brother driver) coordinates are relative the corner of this area.
+
+ *********************************************************************
+ *********************************************************************
+ -->
+
+ <Template brand="Brother" part="DK-1201" size="Other" width="25.91mm" height="83.90mm" description="Standard Address Labels 29mm x 90mm">
+ <Label-rectangle id="0" width="25.91mm" height="83.90mm" round="0" x_waste="0" y_waste="0">
+ <Markup-rect x1="-1.5mm" y1="-3mm" w="29mm" h="90mm" r="1.5mm" />
+ <Layout nx="1" ny="1" x0="0" y0="0" dx="0" dy="0"/>
+ </Label-rectangle>
+ </Template>
+
+ <Template brand="Brother" part="DK-1202" size="Other" width="58.93mm" height="93.20mm" description="Shipping Labels 62mm x 100mm">
+ <Label-rectangle id="0" width="58.93mm" height="93.20mm" round="0" x_waste="0" y_waste="0">
+ <Markup-rect x1="-1.5mm" y1="-3mm" w="62mm" h="100mm" r="1.5mm" />
+ <Layout nx="1" ny="1" x0="0" y0="0" dx="0" dy="0"/>
+ </Label-rectangle>
+ </Template>
+
+ <Template brand="Brother" part="DK-1204" size="Other" width="13.97mm" height="47.92mm" description="Multi Purpose Labels 17mm x 54mm">
+ <Label-rectangle id="0" width="13.97mm" height="47.92mm" round="0" x_waste="0" y_waste="0">
+ <Markup-rect x1="-1.5mm" y1="-3mm" w="17mm" h="54mm" r="1.5mm" />
+ <Layout nx="1" ny="1" x0="0" y0="0" dx="0" dy="0"/>
+ </Label-rectangle>
+ </Template>
+
+
+</Glabels-templates>
m = markup->margin.size;
- gl_label_get_size (label, &w, &h);
+ lgl_template_frame_get_size (frame, &w, &h);
w = w - 2*m;
h = h - 2*m;
r = MAX (frame->rect.r - m, 0.0);
frame = (lglTemplateFrame *)label->template->frames->data;
- gl_label_get_size (label, &w, &h);
+ lgl_template_frame_get_size (frame, &w, &h);
xc = w/2.0;
yc = h/2.0;
const lglTemplateFrame *frame;
GList *p;
lglTemplateMarkup *markup;
+ gdouble width, height;
g_return_if_fail (view && GL_IS_VIEW (view));
g_return_if_fail (view->label && GL_IS_LABEL (view->label));
cairo_save (cr);
+ if (label->rotate_flag)
+ {
+ lgl_template_frame_get_size (frame, &width, &height);
+ cairo_rotate (cr, -M_PI/2.0);
+ cairo_translate (cr, -width, 0.0);
+ }
+
cairo_set_line_width (cr, MARKUP_LINE_WIDTH_PIXELS/(view->home_scale * view->zoom));
cairo_set_source_rgb (cr, MARKUP_RGB_ARGS);