mirror of
https://github.com/bend-n/fimg.git
synced 2024-12-22 10:28:21 -06:00
doc auto cfg
This commit is contained in:
parent
59bf636236
commit
831f05de5b
|
@ -48,3 +48,6 @@ debug = 2
|
|||
opt-level = 3
|
||||
lto = "thin"
|
||||
incremental = true
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
|
|
|
@ -10,7 +10,7 @@ impl<T: AsMut<[u8]> + AsRef<[u8]>> Image<T, 4> {
|
|||
/// ```
|
||||
/// # use fimg::Image;
|
||||
/// let font = fontdue::Font::from_bytes(
|
||||
/// &include_bytes!("../../tdata/CascadiaCode.ttf")[..],
|
||||
/// &include_bytes!("../../tdata/CascadiaCode.ttf")[..],
|
||||
/// fontdue::FontSettings {
|
||||
/// scale: 200.0,
|
||||
/// ..Default::default()
|
||||
|
@ -18,7 +18,7 @@ impl<T: AsMut<[u8]> + AsRef<[u8]>> Image<T, 4> {
|
|||
/// ).unwrap();
|
||||
/// let mut i: Image<_, 4> = Image::alloc(750, 250).boxed();
|
||||
/// i.text(50, 10, 200.0, &font, "hello", [0, 0, 0, 255]);
|
||||
/// assert_eq!(i.buffer(), include_bytes!("../../tdata/text.imgbuf"));
|
||||
/// # assert_eq!(i.buffer(), include_bytes!("../../tdata/text.imgbuf"));
|
||||
/// ```
|
||||
pub fn text(&mut self, x: u32, y: u32, size: f32, font: &Font, text: &str, color: [u8; 4]) {
|
||||
let mut lay =
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
slice_flatten,
|
||||
portable_simd,
|
||||
array_windows,
|
||||
doc_auto_cfg,
|
||||
const_option,
|
||||
array_chunks
|
||||
)]
|
||||
|
|
Loading…
Reference in a new issue