5 #include <winpr/error.h>
7 int TestRdTkNinePatch(
int argc,
char* argv[])
9 rdtkEngine* engine = NULL;
10 rdtkSurface* surface = NULL;
11 uint32_t scanline = 0;
20 if (!(engine = rdtk_engine_new()))
22 printf(
"%s: error creating rdtk engine (%" PRIu32
")\n", __func__, GetLastError());
31 if (!(surface = rdtk_surface_new(engine, NULL, width, height, scanline)))
33 printf(
"%s: error creating auto-allocated surface (%" PRIu32
")\n", __func__,
37 rdtk_surface_free(surface);
41 if (!(data = calloc(height, scanline)))
43 printf(
"%s: error allocating surface buffer (%" PRIu32
")\n", __func__, GetLastError());
47 if (!(surface = rdtk_surface_new(engine, data, width, height, scanline)))
49 printf(
"%s: error creating self-allocated surface (%" PRIu32
")\n", __func__,
57 rdtk_surface_free(surface);
58 rdtk_engine_free(engine);