Commits

tabe  committed 6c65d82

good examples start gdPangoInit(), without memory leak of course.

  • Participants
  • Parent commits ebf3131

Comments (0)

Files changed (2)

File examples/rotated.c

 	PangoMatrix rotated_matrix = PANGO_MATRIX_INIT;
 	PangoLayout *layout;
 
+	gdPangoInit();
+
 	default_colors.fg = gdTrueColorAlpha(0, 255, 255, 0);
 	default_colors.bg = gdTrueColorAlpha(255, 255, 255, 0);
 	default_colors.alpha = 0;

File examples/simple.c

 	gdPangoColors default_colors;
 	PangoContext *pangocontext;
 
+	gdPangoInit();
+
 	default_colors.fg = gdTrueColorAlpha(0, 0, 255, 0);
 	default_colors.bg = gdTrueColorAlpha(255, 255, 255, 0);
 	default_colors.alpha = 0;
 	fp = fopen("c.png", "wb");
 	gdImagePng(im, fp);
 	fclose(fp);
-
 	gdImageDestroy(im);
 
 	/* Render to a new image, sized for text */
 	fp = fopen("d.png", "wb");
 	gdImagePng(im, fp);
 	fclose(fp);
+	gdImageDestroy(im);
 
 	gdPangoFreeContext(context);
 	return 0;