Correct size of PostNet

Add pitch and height restrictions for rendering PostNet and PLANET symbols.
Thanks to Jim Evans.
This commit is contained in:
Robin Stuart 2010-12-26 17:43:49 +00:00
parent e2f35eaf39
commit 4f86c12ec4

View File

@ -310,6 +310,12 @@ int render_plot(struct zint_symbol *symbol, float width, float height)
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))) {
/* Australia Post use the same sizes as USPS */