blob: 4762b5efd97f71d1647c204e4e34ce3c66df2f4e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "test.h"
void drawRandomRect(VkvgContext ctx, float s) {
float w = (float)test_width;
float h = (float)test_height;
randomize_color(ctx);
float x = truncf(w * rndf());
float y = truncf(h * rndf());
vkvg_rectangle(ctx, x, y, s, s);
}
void fixedSizeRects() {
VkvgContext ctx = _initCtx();
for (uint32_t i = 0; i < test_size; i++) {
drawRandomRect(ctx, 50.0f);
vkvg_fill(ctx);
}
vkvg_destroy(ctx);
}
int main(int argc, char *argv[]) {
PERFORM_TEST(fixedSizeRects, argc, argv);
return 0;
}
|