Trait bevy::ui::measurement::Measure
source · pub trait Measure: Send + Sync + 'static {
// Required method
fn measure(
&self,
width: Option<f32>,
height: Option<f32>,
available_width: AvailableSpace,
available_height: AvailableSpace
) -> Vec2;
}
Expand description
A Measure
is used to compute the size of a ui node
when the size of that node is based on its content.
Required Methods§
sourcefn measure(
&self,
width: Option<f32>,
height: Option<f32>,
available_width: AvailableSpace,
available_height: AvailableSpace
) -> Vec2
fn measure( &self, width: Option<f32>, height: Option<f32>, available_width: AvailableSpace, available_height: AvailableSpace ) -> Vec2
Calculate the size of the node given the constraints.