Struct ImageCropEditorProps
pub struct ImageCropEditorProps {
pub image: PictureSource,
pub left: f64,
pub top: f64,
pub right: f64,
pub bottom: f64,
pub change: Event,
pub pictures: Option<Pictures>,
pub aspect: Option<f64>,
}Expand description
A picture with a crop its four corners set (a scanned page, a photo to trim): drag a corner to move it, or an edge’s arrow keys, and it reports the crop each time it changes. The picture is letterboxed in its box; the crop is a share of the picture, never of the box.
Fields§
§image: PictureSourceThe picture to crop.
left: f64The left crop edge, from 0 (the picture’s left) to 1.
top: f64The top crop edge, from 0 (the picture’s top) to 1.
right: f64The right crop edge, to 1 at the picture’s right.
bottom: f64The bottom crop edge, to 1 at the picture’s bottom.
change: EventThe crop changed: carries its edges, left, top, right, bottom, each 0..=1.
pictures: Option<Pictures>The window’s pictures, through which the picture loads.
aspect: Option<f64>The box’s shape before the picture is here (its width over its height).
Trait Implementations§
§impl Component for ImageCropEditorProps
impl Component for ImageCropEditorProps
fn describe() -> Description
§fn from_source(source: &mut dyn Source) -> Result<ImageCropEditorProps, Error>
fn from_source(source: &mut dyn Source) -> Result<ImageCropEditorProps, Error>
The props
source gives. Read more§impl Default for ImageCropEditorProps
impl Default for ImageCropEditorProps
§fn default() -> ImageCropEditorProps
fn default() -> ImageCropEditorProps
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ImageCropEditorProps
impl !RefUnwindSafe for ImageCropEditorProps
impl !Send for ImageCropEditorProps
impl !Sync for ImageCropEditorProps
impl Unpin for ImageCropEditorProps
impl UnsafeUnpin for ImageCropEditorProps
impl !UnwindSafe for ImageCropEditorProps
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.