pub struct BorderRectLayout {
pub brush_size: Size2D<f32, PhysicalPx>,
pub background_rect: Rect<f32, PhysicalPx>,
pub background_radius: PhysicalBorderRadius,
pub border_rect: Rect<f32, PhysicalPx>,
pub border_radius: PhysicalBorderRadius,
pub border_width: Length<f32, PhysicalPx>,
pub border_color: Brush,
}Expand description
The geometry for drawing a RenderBorderRectangle in the CSS box model, shared by
the renderers that stroke the border centered on a path: the border is drawn entirely
inside the item’s geometry, the background doesn’t extend under an opaque border, and
brushes are resolved against the full border box.
Fields§
§brush_size: Size2D<f32, PhysicalPx>The size of the border box, for resolving the background and border brushes.
background_rect: Rect<f32, PhysicalPx>The rectangle to fill with the background brush.
background_radius: PhysicalBorderRadiusThe corner radii of background_rect.
border_rect: Rect<f32, PhysicalPx>The rectangle to stroke with border_color when border_width is positive.
border_radius: PhysicalBorderRadiusThe corner radii of border_rect.
border_width: Length<f32, PhysicalPx>The stroke width of the border; zero for transparent borders.
border_color: BrushThe border brush.
Implementations§
Source§impl BorderRectLayout
impl BorderRectLayout
Sourcepub fn new(
rect: Pin<&dyn RenderBorderRectangle>,
size: LogicalSize,
scale_factor: ScaleFactor,
) -> Option<Self>
pub fn new( rect: Pin<&dyn RenderBorderRectangle>, size: LogicalSize, scale_factor: ScaleFactor, ) -> Option<Self>
Computes the layout for a border rectangle of size, or None when the
geometry is empty.
Auto Trait Implementations§
impl Freeze for BorderRectLayout
impl RefUnwindSafe for BorderRectLayout
impl Send for BorderRectLayout
impl Sync for BorderRectLayout
impl Unpin for BorderRectLayout
impl UnsafeUnpin for BorderRectLayout
impl UnwindSafe for BorderRectLayout
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