Enum pixel_widgets::draw::Background [−][src]
Expand description
Generic background definition
Variants
Draw no background
Color(Color)Draw a solid color
Draw a stretched image multiplied by a color
Draw a 9 patch image multiplied by a color
Implementations
impl Background[src]
impl Background[src]pub fn content_rect(&self, layout: Rectangle, padding: Rectangle) -> Rectangle[src]
pub fn content_rect(&self, layout: Rectangle, padding: Rectangle) -> Rectangle[src]Content rect for a given size and padding
pub fn layout_rect(
&self,
content_rect: Rectangle,
padding: Rectangle
) -> Rectangle[src]
pub fn layout_rect(
&self,
content_rect: Rectangle,
padding: Rectangle
) -> Rectangle[src]Layout rect for a given content size and padding.
This is the inverse of content_rect
pub fn resolve_size(
&self,
widget: (Size, Size),
content: (Size, Size),
padding: Rectangle
) -> (Size, Size)[src]
pub fn resolve_size(
&self,
widget: (Size, Size),
content: (Size, Size),
padding: Rectangle
) -> (Size, Size)[src]Resolve the size of a widget when taking this background and padding into account
pub fn minimum_size(&self) -> (f32, f32)[src]
pub fn minimum_size(&self) -> (f32, f32)[src]Size of the background if the content rect is zero sized
Trait Implementations
impl Clone for Background[src]
impl Clone for Background[src]fn clone(&self) -> Background[src]
fn clone(&self) -> Background[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for Background
impl Send for Background
impl Sync for Background
impl Unpin for Background
impl UnwindSafe for Background
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for Timpl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more