Adiciona tipo imagem (core) + tinyblocks-ppm e previa de imagem no balao
This commit is contained in:
1 parent
f794d8b8c7
commit
959a4027c3
16 files changed
+721
-10
No files matched your search
@@ -16,6 +16,7 @@
|
||||
#include <tb_pen.h>
|
||||
#include <tb_curves.h>
|
||||
#include <tb_base64.h>
|
||||
#include <tb_ppm.h>
|
||||
|
||||
static TinyBlocks* rt;
|
||||
static TinyBlocks_Block *ev, *scene;
|
||||
@@ -126,6 +127,7 @@ int main(void) {
|
||||
tb_library_register(rt, tb_pen_get_library());
|
||||
tb_library_register(rt, tb_curves_get_library());
|
||||
tb_library_register(rt, tb_base64_get_library());
|
||||
tb_library_register(rt, tb_ppm_get_library());
|
||||
tb_library_register(rt, tb_graphics_get_library());
|
||||
tb_library_register(rt, tb_editor_get_library());
|
||||
(void)eval_ev;
|
||||
@@ -438,6 +440,21 @@ int main(void) {
|
||||
}
|
||||
CHECK(ws_has("37 pontos"), "balão mostra a contagem de pontos da curva");
|
||||
|
||||
/* 20. Previa de imagem: PPM.New em balão desenha TB_DRAW_IMAGE */
|
||||
if (need("PPM", R_CAT, 0, &x, &y)) click(x, y);
|
||||
frame(0, 0, 0, 0, 0, 0, NULL);
|
||||
if (need("nova imagem(", R_FLY, 0, &x, &y)) drag(x, y, 640, 520);
|
||||
frame(0, 0, 0, 0, 0, 0, NULL);
|
||||
if (need("nova imagem(", R_WS, 0, &x, &y)) { click(x, y); click(x, y); }
|
||||
frame(0, 0, 0, 0, 0, 0, NULL);
|
||||
{
|
||||
int imgs = 0;
|
||||
for (uint32_t i = 0; i < ncmd; i++)
|
||||
if (cmds[i].kind == TB_DRAW_IMAGE) imgs++;
|
||||
CHECK(imgs >= 1, "clique duplo numa imagem desenha TB_DRAW_IMAGE no balão");
|
||||
}
|
||||
CHECK(ws_has("32x32"), "balão mostra as dimensões da imagem");
|
||||
|
||||
printf("comandos de desenho no último frame: %u\n", ncmd);
|
||||
tinyblocks_deinit(&rt);
|
||||
printf(fails ? "\n%d FALHA(S)\n" : "\nTUDO OK\n", fails);
|
||||
|
||||
Reference in new issue
Block a user