UXRscReader
UXRscReader reads a GEM resource into a
UXRscDoc, on every backend. From 0.7
(earlier it was part of Rocks).
#import "UXRscRead.xc"Overview
Section titled “Overview”UXRscDoc* doc = UXRscReader.read(bytes, len);It reads either byte order, packed or pixel coordinates, and the rsc chunk at
rsh_rssize in any version (1, 2 or 3): forms and their layouts, logical ids,
class overrides, top-level objects and connections. Extension sections it does
not interpret are kept so that a save writes them back.
A payload it cannot represent yet is counted, not dropped quietly:
wasLossless says whether anything was.
Topics
Section titled “Topics”read · reader · warning · wasLossless
static UXRscDoc* read(u8* bytes, i32 n)The document, or null when the bytes are not a resource.
reader
Section titled “reader”static UXRscReader* reader(u8* bytes, i32 n)The reader after reading, for its warning; the document is its result.
warning
Section titled “warning”u8* warning(void)What could not be kept, or null.
wasLossless
Section titled “wasLossless”bool wasLossless(void)