Adiciona tinyblocks-vg e tinyblocks-svg (rasterizador + parser SVG) e specs no editor
This commit is contained in:
1 parent
f4e2556110
commit
714186a1a1
12 files changed
+1272
-6
No files matched your search
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* TinyBlocks - tb_vg.h
|
||||
* Library tinyblocks-vg: construcao de desenhos vetoriais (TinyBlocks_VectorData)
|
||||
* e rasterizacao para TinyBlocks_Image. Base de renderizacao do tinyblocks-svg.
|
||||
*
|
||||
* Cada helper gera comandos autocontidos (incluindo a cor), de modo que o
|
||||
* documento pode ser rasterizado pela tinyblocks-vg e tambem reproduzido no
|
||||
* palco por tb_draw_ctx_play.
|
||||
*/
|
||||
#ifndef TINYBLOCKS_VG_H
|
||||
#define TINYBLOCKS_VG_H
|
||||
|
||||
#include <tinyblocks/tinyblocks.h>
|
||||
|
||||
TB_API const TinyBlocks_LibraryDescriptor* tb_vg_get_library(void);
|
||||
|
||||
/* -- API C --- */
|
||||
TB_API TinyBlocks_VectorData* tb_vg_new(void);
|
||||
|
||||
/* Rasteriza o documento numa imagem w x h. "scale" amplia as coordenadas
|
||||
* (0 ou negativo = 1). O fundo e' transparente. */
|
||||
TB_API TinyBlocks_Image* tb_vg_render(const TinyBlocks_VectorData* v,
|
||||
int w, int h, float scale);
|
||||
|
||||
TB_API bool tb_vg_line (TinyBlocks_VectorData* v, float x1, float y1, float x2, float y2,
|
||||
float r, float g, float b, float a, float width);
|
||||
TB_API bool tb_vg_rect (TinyBlocks_VectorData* v, float x, float y, float w, float h,
|
||||
float r, float g, float b, float a);
|
||||
TB_API bool tb_vg_circle (TinyBlocks_VectorData* v, float cx, float cy, float rad,
|
||||
float r, float g, float b, float a);
|
||||
TB_API bool tb_vg_polygon(TinyBlocks_VectorData* v, const double* xy, int n, bool closed,
|
||||
float r, float g, float b, float a);
|
||||
|
||||
#endif /* TINYBLOCKS_VG_H */
|
||||
Reference in new issue
Block a user