Trait bevy_internal::ui::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§

source

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.

Implementors§