pub struct ImageViewState {
pub zoom: f64,
pub cx: f64,
pub cy: f64,
pub fit: bool,
pub label: String,
pub gpu: CanvasGpu,
/* private fields */
}Expand description
the app-owned state of an image view (see the module header of imgview.rs)
Fields§
§zoom: f641.0 = 100 %
cx: f64the image point (image px) at the centre of the view
cy: f64§fit: boolthe zoom follows the view: the whole image, centred
label: Stringthe accessible name (empty: the SVG’s title, else “Bild”)
gpu: CanvasGpuhow the view’s zoom and pan use the GPU (canvas.rs)
Implementations§
Source§impl ImageViewState
impl ImageViewState
Sourcepub fn set_actual(&mut self)
pub fn set_actual(&mut self)
100 %, the centre kept
Trait Implementations§
Source§impl Clone for ImageViewState
impl Clone for ImageViewState
Source§impl Debug for ImageViewState
impl Debug for ImageViewState
Source§impl Default for ImageViewState
impl Default for ImageViewState
Source§fn default() -> ImageViewState
fn default() -> ImageViewState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ImageViewState
impl !Send for ImageViewState
impl !Sync for ImageViewState
impl !UnwindSafe for ImageViewState
impl Forget for ImageViewState
impl Freeze for ImageViewState
impl Unpin for ImageViewState
impl UnsafeUnpin for ImageViewState
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