pub struct PositionedRectangle {
pub size: LayoutSize,
pub position: PositionInfo,
pub padding: ResolvedOffsets,
pub margin: ResolvedOffsets,
pub border_widths: ResolvedOffsets,
pub resolved_text_layout_options: Option<(ResolvedTextLayoutOptions, InlineTextLayout, LayoutRect)>,
pub overflow: Overflow,
}
Fields§
§size: LayoutSize
Outer bounds of the rectangle
position: PositionInfo
How the rectangle should be positioned
padding: ResolvedOffsets
Padding of the rectangle
margin: ResolvedOffsets
Margin of the rectangle
border_widths: ResolvedOffsets
Border widths of the rectangle
resolved_text_layout_options: Option<(ResolvedTextLayoutOptions, InlineTextLayout, LayoutRect)>
If this is an inline rectangle, resolve the %-based font sizes and store them here.
overflow: Overflow
Determines if the rect should be clipped or not (TODO: x / y as separate fields!)
Implementations§
Source§impl PositionedRectangle
impl PositionedRectangle
pub fn get_static_bounds(&self) -> Option<LayoutRect>
pub fn to_layouted_rectangle(&self) -> LayoutedRectangle
pub fn get_content_size(&self) -> LayoutSize
pub fn get_background_bounds(&self) -> (LayoutSize, PositionInfo)
pub fn get_margin_box_width(&self) -> f32
pub fn get_margin_box_height(&self) -> f32
pub fn get_left_leading(&self) -> f32
pub fn get_top_leading(&self) -> f32
Trait Implementations§
Source§impl Clone for PositionedRectangle
impl Clone for PositionedRectangle
Source§fn clone(&self) -> PositionedRectangle
fn clone(&self) -> PositionedRectangle
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PositionedRectangle
impl Debug for PositionedRectangle
Source§impl PartialEq for PositionedRectangle
impl PartialEq for PositionedRectangle
Source§impl PartialOrd for PositionedRectangle
impl PartialOrd for PositionedRectangle
impl StructuralPartialEq for PositionedRectangle
Auto Trait Implementations§
impl Freeze for PositionedRectangle
impl RefUnwindSafe for PositionedRectangle
impl Send for PositionedRectangle
impl Sync for PositionedRectangle
impl Unpin for PositionedRectangle
impl UnwindSafe for PositionedRectangle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)