mirror of
https://git.code.sf.net/p/zint/code
synced 2025-12-20 03:17:12 +00:00
Added width and height parameters to rendering for easier output control
This commit is contained in:
@@ -179,7 +179,7 @@ extern int grid_matrix(struct zint_symbol *symbol, unsigned char source[], int l
|
||||
extern int png_handle(struct zint_symbol *symbol, int rotate_angle);
|
||||
#endif
|
||||
|
||||
extern int render_plot(struct zint_symbol *symbol, unsigned int hide_text);
|
||||
extern int render_plot(struct zint_symbol *symbol, unsigned int hide_text, float width, float height);
|
||||
|
||||
extern int bmp_handle(struct zint_symbol *symbol, int rotate_angle);
|
||||
extern int ps_plot(struct zint_symbol *symbol);
|
||||
@@ -868,9 +868,13 @@ int ZBarcode_Encode_File_and_Buffer(struct zint_symbol *symbol, char *filename,
|
||||
*
|
||||
* Converts encoded data into an intermediate format to be interpreted
|
||||
* in other applications using this library.
|
||||
*
|
||||
* If the width and height are not set to zero, the barcode will be resized to those
|
||||
* dimensions. The symbol->scale and symbol->height values are totally ignored in this case.
|
||||
*
|
||||
*/
|
||||
int ZBarcode_Render(struct zint_symbol *symbol, unsigned int hide_text)
|
||||
int ZBarcode_Render(struct zint_symbol *symbol, unsigned int hide_text, float width, float height)
|
||||
{
|
||||
// Send the request to the render_plot method
|
||||
return render_plot(symbol, hide_text);
|
||||
return render_plot(symbol, hide_text, width, height);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user