23 lines
927 B
C
23 lines
927 B
C
/*
|
|
* 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 */
|