Gate the Path item behind the 'std' feature

This commit is contained in:
Olivier Goffart 2021-11-25 13:41:01 +01:00 committed by Olivier Goffart
parent 5b4d6e8ece
commit 844c5cf7ec
9 changed files with 183 additions and 146 deletions

View file

@ -601,6 +601,7 @@ pub fn box_layout_info_ortho(cells: Slice<BoxLayoutCellData>, padding: &Padding)
fold
}
#[cfg(feature = "std")]
#[repr(C)]
pub struct PathLayoutData<'a> {
pub elements: &'a crate::graphics::PathData,
@ -612,13 +613,7 @@ pub struct PathLayoutData<'a> {
pub offset: f32,
}
#[repr(C)]
#[derive(Default)]
pub struct PathLayoutItemData {
pub width: Coord,
pub height: Coord,
}
#[cfg(feature = "std")]
pub fn solve_path_layout(data: &PathLayoutData, repeater_indexes: Slice<u32>) -> SharedVector<f32> {
use lyon_geom::*;
use lyon_path::iterator::PathIterator;