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,22 @@
|
||||
/*
|
||||
* TinyBlocks - tb_svg.h
|
||||
* Library tinyblocks-svg: le um subconjunto de SVG (retangulos, circulos,
|
||||
* linhas, polilinhas/poligonos e paths com M/L/H/V/C/Q/Z) e produz um desenho
|
||||
* vetorial (tinyblocks-vg) ou uma imagem rasterizada (tinyblocks-image).
|
||||
* Suporta <image> com data URI base64 (PPM) via tinyblocks-base64.
|
||||
*/
|
||||
#ifndef TINYBLOCKS_SVG_H
|
||||
#define TINYBLOCKS_SVG_H
|
||||
|
||||
#include <tinyblocks/tinyblocks.h>
|
||||
|
||||
TB_API const TinyBlocks_LibraryDescriptor* tb_svg_get_library(void);
|
||||
|
||||
/* Interpreta o SVG e devolve o desenho vetorial (TB_VALUE_VECTOR).
|
||||
* out_w/out_h recebem as dimensoes intrinsecas declaradas no SVG. */
|
||||
TB_API TinyBlocks_VectorData* tb_svg_parse(const char* svg, int* out_w, int* out_h);
|
||||
/* Interpreta e rasteriza para uma imagem w x h (ajustando a escala). */
|
||||
TB_API TinyBlocks_Image* tb_svg_render(const char* svg, int w, int h);
|
||||
TB_API const char* tb_svg_last_error(void);
|
||||
|
||||
#endif /* TINYBLOCKS_SVG_H */
|
||||
Reference in new issue
Block a user