25#if __has_include("book_paged.h")
69static const char*
const s_tag =
"zoom_book";
Flat, execute-in-place container for a build-time "compiled" e-book.
@ k_book_image_gray4
4bpp gray, 2px/byte; pixel (x,y) is at flat index y*width + x.
Paged (demand-fetched) accessor mode for book over ra8_vmem (#163).
ra8_err_t book_src_image_rect(const book_src_t *src, const book_image_t *img, uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint8_t *out, uint32_t out_stride)
Read a sub-rectangle of a raster image (4bpp or 8bpp) as gray8, row by row.
ra8_err_t book_src_image(const book_src_t *src, uint32_t idx, book_image_t *out_img)
Read one image descriptor out of a book source (resident or paged).
static const char * s_tag
Logging / check tag.
Validation and Error-Checking Macros for ra8-firmware.
#define RA8_RETURN_ON_ERROR(err, tag, message)
Early return on error, propagating the code upward.
#define RA8_CHECK_NULL_PTR(ptr, tag, message)
Reject nullptr pointer, returning k_ra8_err_null_ptr.
Error Code Definitions for ra8-firmware.
@ k_ra8_err_not_supported
Requested feature not compiled in, not wired, or not supported by this MCU variant.
@ k_ra8_err_invalid_arg
Invalid function argument.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
#define ra8_log_error(tag, message)
RA8 log error.
Descriptor for one transcoded image in the image pool.
uint16_t height
Pixel height.
uint8_t format
book_image_format_t.
uint16_t width
Pixel width.
A book data source: resident (zero-copy) or paged (demand-fetched).
One .rabook raster figure, ready to be magnified.
const book_src_t * src
Borrowed book source (resident or paged).
book_image_t img
Copy of the image descriptor being zoomed.
A magnifiable full-resolution image behind the gray8 sub-rect seam.
Tap-to-zoom image viewer: viewport state machine + tiled magnifying render (#478).
ra8_err_t zoom_source_init(zoom_source_t *out, zoom_read_fn read, void *ctx, uint32_t width, uint32_t height)
Bind a gray8 sub-rectangle reader and its extent as a magnifiable source.
Bind a .rabook image-pool figure as a zoom source (#478).
ra8_err_t zoom_book_src_bind(zoom_book_src_t *bs, zoom_source_t *out)
Present a bound figure to the zoom engine as a zoom_source_t.
ra8_err_t zoom_book_read(void *ctx, uint32_t x, uint32_t y, uint32_t w, uint32_t h, uint8_t *out, uint32_t out_stride)
zoom_read_fn over a .rabook image pool.
ra8_err_t zoom_book_src_init(zoom_book_src_t *bs, const book_src_t *src, uint32_t img_idx)
Look up one image in a book source and prepare it for magnification.