Commit graph

8 commits

Author SHA1 Message Date
Olivier Goffart
dd756ef112 Adapt the parser to parse := instead of = 2020-05-25 10:46:00 +02:00
Olivier Goffart
ab28828351 Support for img!("foo.png") to make string absolute
This is a temporary solution until we get better ressource handling
2020-05-19 16:30:48 +02:00
Simon Hausmann
23d3964a0d Add boilerplate for text items
Forward the text and color properties to the rendering backend, where
right now we just rendering all the glyphs into a dedicated texture.

Next steps are a glyph atlas texture, blending the specified color with
the alpha of the glyphs, configurable size and family, shaping with
Harfbuzz and may more things.
2020-05-18 19:04:12 +02:00
Simon Hausmann
3142883ca8 Render the contents of image elements
The source property is a path relative to the path of the executable.
That is still rather inconvenient. It would be more convenient to make
it relative to the source file, but the corresponding proc-macro span
source_file() accessor is not public/stable.

Perhaps there's a way of doing this also through the generated code and
std::file!().
2020-05-13 10:27:09 +02:00
Simon Hausmann
3aac8282a8 Allow passing string literals to string properties in Rust
In the Rust code generator, convert to a null terminated byte literal.
2020-05-13 10:01:19 +02:00
Olivier Goffart
7c2f40da90 Generator for the rust API 2020-05-12 11:43:29 +02:00
Olivier Goffart
b9cd725f78 Allow to use proc_macro tokens
And report errors
2020-05-11 22:24:28 +02:00
Olivier Goffart
dc33cbbcda Dummy structure for the rust example 2020-05-11 20:39:16 +02:00