Skip to main content

Module image_lower

Module image_lower 

Source
Expand description

Lower #image and #figure parser directives into semantic nodes.

StructsΒ§

FigureDirectiveArgs πŸ”’
ImageDirectiveArgs πŸ”’

ConstantsΒ§

BITS_PER_COMPONENT_ATTR πŸ”’
COLOR_SPACE_ATTR πŸ”’
FIGURE_KEYS πŸ”’
Keys accepted by collect_one_figure_arg’s named-argument match; the MOS0015 nearest-match candidate set. Keep in sync with the match arms.
IMAGE_KEYS πŸ”’
Keys accepted by collect_one_image_arg’s named-argument match; the MOS0015 nearest-match candidate set. Keep in sync with the match arms.
PIXELS_ATTR πŸ”’
PIXEL_HEIGHT_ATTR πŸ”’
PIXEL_WIDTH_ATTR πŸ”’

FunctionsΒ§

append_caption πŸ”’
build_image_attributes πŸ”’
Walk a directive’s argument list and produce the attribute map for an [NodeKind::Image] node, including the decoded pixel buffer. Returns None (and emits diagnostics) if the path argument is missing or the bytes can’t be decoded – the caller drops the node in that case rather than emitting a half-built image.
collect_figure_args πŸ”’
collect_image_args πŸ”’
collect_image_path πŸ”’
collect_numbered πŸ”’
collect_one_figure_arg πŸ”’
collect_one_image_arg πŸ”’
collect_string_arg πŸ”’
collect_supplement πŸ”’
lower_figure_directive πŸ”’
Lower #figure(image: ..., caption: ...) into a figure node.
lower_image_directive πŸ”’
Lower #image(...) into one [NodeKind::Image] node.
type_error πŸ”’