src/lib/zint/render.c
int render_plot_add_string(struct zint_symbol *symbol,
		uint8_t *text, float x, float y, float fsize, float width,
		struct zint_render_string **last_string)
{
	struct zint_render_string *string;

	string = malloc(sizeof(struct zint_render_string));
	string->next = NULL;
	string->x = x;
	string->y = y;
	string->width = width;
	string->fsize = fsize;
	string->length = ustrlen(text);
	string->text = malloc(sizeof(uint8_t) * (ustrlen(text) + 1));
	ustrcpy(string->text, text);

	if (*last_string)
		(*last_string)->next = string;
	else
		symbol->rendered->strings = string; // First character
	*last_string = string;

	return 1;
}
/*
 * Add a string structure to the symbol.
 * Coordinates assumed to be from top-center.
 */
Add a string structure to the symbol.
Coordinates assumed to be from top-center.
Add a string structure to the symbol . Coordinates assumed to be from top - center .
int render_plot_add_string(struct zint_symbol *symbol,
		uint8_t *text, float x, float y, float fsize, float width,
		struct zint_render_string **last_string)
{
	struct zint_render_string *string;
	string = malloc(sizeof(struct zint_render_string));
	string->next = NULL;
	string->x = x;
	string->y = y;
	string->width = width;
	string->fsize = fsize;
	string->length = ustrlen(text);
	string->text = malloc(sizeof(uint8_t) * (ustrlen(text) + 1));
	ustrcpy(string->text, text);
	if (*last_string)
		(*last_string)->next = string;
	else
		symbol->rendered->strings = string; 
	*last_string = string;
	return 1;
}
int render_plot_add_string ( struct zint_symbol * symbol , uint8_t * text , float x , float y , float fsize , float width , struct zint_render_string * * last_string ) { struct zint_render_string * string ; string = malloc ( sizeof ( struct zint_render_string ) ) ; string -> next = NULL ; string -> x = x ; string -> y = y ; string -> width = width ; string -> fsize = fsize ; string -> length = ustrlen ( text ) ; string -> text = malloc ( sizeof ( uint8_t ) * ( ustrlen ( text ) + 1 ) ) ; ustrcpy ( string -> text , text ) ; if ( * last_string ) ( * last_string ) -> next = string ; else symbol -> rendered -> strings = string ; * last_string = string ; return 1 ; }
Add a string structure to the symbol.
Add a string structure to the symbol .
// First character