From 69cae0234126851d6ae6607caf62fe980417a55c Mon Sep 17 00:00:00 2001 From: Mira Grudzinska Date: Tue, 26 Oct 2021 02:21:07 +0200 Subject: [PATCH] example: modify the tvg example to plot all of the files Change-Id: I63908b03d0276aa78bc8a266c62a89c98f9634c1 --- src/examples/Tvg.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/examples/Tvg.cpp b/src/examples/Tvg.cpp index 1f57911..1cde659 100644 --- a/src/examples/Tvg.cpp +++ b/src/examples/Tvg.cpp @@ -27,8 +27,9 @@ /* Drawing Commands */ /************************************************************************/ -#define NUM_PER_LINE 6 -#define SIZE (WIDTH/NUM_PER_LINE) +#define NUM_PER_ROW 7 +#define NUM_PER_COL 6 +#define SIZE (WIDTH/NUM_PER_ROW) static int count = 0; @@ -48,7 +49,7 @@ void tvgDirCallback(const char* name, const char* path, void* data) if (picture->load(buf) != tvg::Result::Success) return; picture->size(SIZE, SIZE); - picture->translate((count % NUM_PER_LINE) * SIZE, SIZE * (count / NUM_PER_LINE)); + picture->translate((count % NUM_PER_ROW) * SIZE, (count / NUM_PER_ROW) * (HEIGHT / NUM_PER_COL)); pictures.push_back(move(picture)); -- 2.7.4