ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
reflow_svg.h
Go to the documentation of this file.
1
41
42#pragma once
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
48#include <stddef.h>
49#include <stdint.h>
50
51#include "ra8_err.h"
52
73[[nodiscard]] bool ra8_svg_is_svg(const uint8_t* bytes, size_t len);
74
100[[nodiscard]] ra8_err_t
101ra8_svg_image_href(const uint8_t* svg, size_t len, size_t* out_off, size_t* out_len);
102
128[[nodiscard]] ra8_err_t
129ra8_svg_size(const uint8_t* svg, size_t len, int32_t* out_w, int32_t* out_h);
130
161[[nodiscard]] ra8_err_t
162ra8_svg_render(const uint8_t* svg, size_t len, int32_t x, int32_t y, int32_t w, int32_t h);
163
164#ifdef __cplusplus
165}
166#endif
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
ra8_err_t ra8_svg_image_href(const uint8_t *svg, size_t len, size_t *out_off, size_t *out_len)
Extract the href of a cover-wrapper <svg><image .../></svg>.
ra8_err_t ra8_svg_render(const uint8_t *svg, size_t len, int32_t x, int32_t y, int32_t w, int32_t h)
Render an SVG's vector shapes into a box.
bool ra8_svg_is_svg(const uint8_t *bytes, size_t len)
Heuristically decide whether bytes are an SVG document.
ra8_err_t ra8_svg_size(const uint8_t *svg, size_t len, int32_t *out_w, int32_t *out_h)
Report an SVG's intrinsic size (width/height, else viewBox dimensions).