pub struct ResolvedBoxEdges {
pub margin: [f32; 4],
pub border: [f32; 4],
pub padding: [f32; 4],
pub content_w: f32,
pub content_h: f32,
}Expand description
Exact resolved CSS box-model edges captured opt-in from Taffy (56 B Copy POD).
Edge order is [top, right, bottom, left] in logical points, honoring margin: auto,
percentage edges, and RTL logical edge resolution.
Fields§
§margin: [f32; 4]§border: [f32; 4]§padding: [f32; 4]§content_w: f32§content_h: f32Implementations§
Source§impl ResolvedBoxEdges
impl ResolvedBoxEdges
Sourcepub fn margin_box(self, border_box: LayoutRect) -> LayoutRect
pub fn margin_box(self, border_box: LayoutRect) -> LayoutRect
Derives the outer margin box from a node’s border box without storing extra coordinates.
Sourcepub fn padding_box(self, border_box: LayoutRect) -> LayoutRect
pub fn padding_box(self, border_box: LayoutRect) -> LayoutRect
Derives the padding box by insetting border_box by self.border.
Sourcepub fn content_box(self, border_box: LayoutRect) -> LayoutRect
pub fn content_box(self, border_box: LayoutRect) -> LayoutRect
Derives the inner content box by insetting padding_box by self.padding.
Trait Implementations§
Source§impl Clone for ResolvedBoxEdges
impl Clone for ResolvedBoxEdges
impl Copy for ResolvedBoxEdges
Source§impl Debug for ResolvedBoxEdges
impl Debug for ResolvedBoxEdges
Source§impl Default for ResolvedBoxEdges
impl Default for ResolvedBoxEdges
Source§impl PartialEq for ResolvedBoxEdges
impl PartialEq for ResolvedBoxEdges
impl StructuralPartialEq for ResolvedBoxEdges
Auto Trait Implementations§
impl Forget for ResolvedBoxEdges
impl Freeze for ResolvedBoxEdges
impl Move for ResolvedBoxEdges
impl RefUnwindSafe for ResolvedBoxEdges
impl Send for ResolvedBoxEdges
impl Sync for ResolvedBoxEdges
impl Unpin for ResolvedBoxEdges
impl UnsafeUnpin for ResolvedBoxEdges
impl UnwindSafe for ResolvedBoxEdges
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more