pub struct DeviceDecodePlan { /* private fields */ }Expand description
Normalized device decode plan derived from source dimensions and request.
Implementations§
Source§impl DeviceDecodePlan
impl DeviceDecodePlan
Sourcepub fn for_image(
source_dims: (u32, u32),
request: DeviceDecodeRequest,
) -> Result<Self, J2kError>
pub fn for_image( source_dims: (u32, u32), request: DeviceDecodeRequest, ) -> Result<Self, J2kError>
Build a normalized plan for an image.
Sourcepub fn source_dims(self) -> (u32, u32)
pub fn source_dims(self) -> (u32, u32)
Original image dimensions.
Sourcepub fn source_rect(self) -> Rect
pub fn source_rect(self) -> Rect
Full-resolution source rectangle to read.
Sourcepub fn output_rect(self) -> Rect
pub fn output_rect(self) -> Rect
Output rectangle in reduced-resolution coordinates.
Sourcepub fn output_dims(self) -> (u32, u32)
pub fn output_dims(self) -> (u32, u32)
Output dimensions in pixels.
Sourcepub fn target_resolution(self) -> Option<(u32, u32)>
pub fn target_resolution(self) -> Option<(u32, u32)>
Target resolution hint for native decoders that accept one.
Sourcepub fn is_full_frame(self) -> bool
pub fn is_full_frame(self) -> bool
Return true when the request is an unscaled full-frame decode.
Trait Implementations§
Source§impl Clone for DeviceDecodePlan
impl Clone for DeviceDecodePlan
Source§fn clone(&self) -> DeviceDecodePlan
fn clone(&self) -> DeviceDecodePlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DeviceDecodePlan
Source§impl Debug for DeviceDecodePlan
impl Debug for DeviceDecodePlan
impl Eq for DeviceDecodePlan
Source§impl PartialEq for DeviceDecodePlan
impl PartialEq for DeviceDecodePlan
impl StructuralPartialEq for DeviceDecodePlan
Auto Trait Implementations§
impl Freeze for DeviceDecodePlan
impl RefUnwindSafe for DeviceDecodePlan
impl Send for DeviceDecodePlan
impl Sync for DeviceDecodePlan
impl Unpin for DeviceDecodePlan
impl UnsafeUnpin for DeviceDecodePlan
impl UnwindSafe for DeviceDecodePlan
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§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