From 4f86c12ec48169ffb531244fe1212d2caa9fde68 Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Sun, 26 Dec 2010 17:43:49 +0000 Subject: [PATCH] Correct size of PostNet Add pitch and height restrictions for rendering PostNet and PLANET symbols. Thanks to Jim Evans. --- backend/render.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/render.c b/backend/render.c index d1ba511a..de086d5f 100644 --- a/backend/render.c +++ b/backend/render.c @@ -309,6 +309,12 @@ int render_plot(struct zint_symbol *symbol, float width, float height) render->width = 0.508 * GL_CONST * total_area_width_x; render->height = 4.064 * GL_CONST; } + + if((symbol->symbology == BARCODE_POSTNET) || (symbol->symbology == BARCODE_PLANET)) { + /* The size of PostNet and PLANET are fized */ + render->width = 0.508 * GL_CONST * total_area_width_x; + render->height = 2.921 * GL_CONST; + } if(((symbol->symbology == BARCODE_AUSPOST) || (symbol->symbology == BARCODE_AUSREPLY)) || ((symbol->symbology == BARCODE_AUSROUTE) || (symbol->symbology == BARCODE_AUSREDIRECT))) {