example: Modify the number of svg image examples

Find the hidden example...
This commit is contained in:
JunsuChoi 2021-10-25 14:33:20 +09:00 committed by Hermet Park
parent 5fc5fd7f2d
commit 0e57f869bc

View file

@ -27,8 +27,9 @@
/* Drawing Commands */ /* Drawing Commands */
/************************************************************************/ /************************************************************************/
#define NUM_PER_LINE 6 #define NUM_PER_ROW 7
#define SIZE (WIDTH/NUM_PER_LINE) #define NUM_PER_COL 6
#define SIZE (WIDTH/NUM_PER_ROW)
static int count = 0; static int count = 0;
@ -48,7 +49,7 @@ void svgDirCallback(const char* name, const char* path, void* data)
if (picture->load(buf) != tvg::Result::Success) return; if (picture->load(buf) != tvg::Result::Success) return;
picture->size(SIZE, SIZE); 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)); pictures.push_back(move(picture));