Struct docima::ImageFile [−][src]
pub struct ImageFile { /* fields omitted */ }
Expand description
An image file generator.
The minimum required setup methods are: width
,
height
and path
Example
ImageFile::new()
.width(600)
.height(400)
.path("images/plotters-histogram.html")
.overwrite(true)
.title("the title")
.alt("the alt text")
.wrapper("div")
.wrapper_style("padding: 10px; background-color: red;")
.generate(my_generator_function)?;
Implementations
Sets the chosen attribute for the <img>
tag.
Valid attributes are: “alt”, “title”, “id”, “class”, “style”, …
Sets an attribute for the wrapper tag around <img>
.
Valid attributes are: “alt”, “title”, “id”, “class”, “style”… And if the wrapper is an anchor “a”, then “href” & “target”.