The scenegraph works with in-memory images. Loading images from URLs is handled in the vega logic using reqwest.
Images are written to a texture atlas, positioned using etagere. The texture coordinates are stored in the vertex structs.
If there are too many images to fit in one texture, the texture us updated once per batch.
Following the design of other marks, I added a generic TextureRenderer that is parameterized by a TextureRenderShader. The image shader contains the image atlas logic. I haven't looked deeply into gradiants, but it's possible there will be a separate GradientShader, or perhaps gradients will reuse the image shader.
aspect, align, baseline, and smooth are all supported
Here are some examples rendered by this PR:
Vega-Lite logos example:
aspect = false
aspect = true with baseline and align specifications
expanded image with smooth=true
expanded image with smooth=false
example with larger images that triggers multi-batch logic:
Adds support for image marks. Some notes:
Here are some examples rendered by this PR:
Vega-Lite logos example:
aspect = false
aspect = true with baseline and align specifications
expanded image with smooth=true
expanded image with smooth=false
example with larger images that triggers multi-batch logic: