/* build: gcc mplus_stroke_line_test.c mplus_stroke_svg.c mplus_stroke_line.c -o mplus_stroke_line_test */

#include <stdio.h>

#include "mplus_stroke_line.h"

static MPLUS_Line_GlyphsData_t g_tGlyphsData;

int main(int i_iArgc, char* astrArgc[]) {
	int i, j;

	LoadMPLUSStroke_Line(&g_tGlyphsData);

	printf("Glyphs count : %d\n", g_tGlyphsData.glyphscount);
	printf("\n");

	for(i = 0; i < g_tGlyphsData.glyphscount; i++) {
		printf("=========================\n");
		printf("UTF-16 : %X\n", g_tGlyphsData.glyphs[i].code);
		printf("UTF-8  : %X\n", g_tGlyphsData.glyphs[i].code8);
		printf("Lines count : %d\n", g_tGlyphsData.glyphs[i].linescount);

		printf("--------------------\n");
		for(j = 0; j < g_tGlyphsData.glyphs[i].linescount; j++) {
			printf("%f %f %f %f\n",
				g_tGlyphsData.glyphs[i].lines[j].pos1.x,
				g_tGlyphsData.glyphs[i].lines[j].pos1.y,
				g_tGlyphsData.glyphs[i].lines[j].pos2.x,
				g_tGlyphsData.glyphs[i].lines[j].pos2.y
			);
		}
		printf("--------------------\n");
		printf("\n");
	}
}
