Struct ImageAttributes

pub struct ImageAttributes { pub display_window: IntegerBounds, pub pixel_aspect: f32, pub chromaticities: Option<Chromaticities>, pub time_code: Option<TimeCode>, pub other: HashMap<Text, AttributeValue> }

Includes mandatory fields like pixel aspect or display window which must be the same for all layers. For more attributes, see struct LayerAttributes.

Fields

display_window: IntegerBounds

The rectangle anywhere in the global infinite 2D space that clips all contents of the file.

pixel_aspect: f32

Aspect ratio of each pixel in this header.

chromaticities: Option<Chromaticities>

The chromaticities attribute of the image. See the Chromaticities type.

time_code: Option<TimeCode>

The time code of the image.

other: HashMap<Text, AttributeValue>

Contains custom attributes. Does not contain the attributes already present in the ImageAttributes. Contains only attributes that are standardized to be the same for all headers: chromaticities and time codes.

Implementations

impl ImageAttributes

fn new(display_window: IntegerBounds) -> Self

Set the display position and size of this image.

fn with_size(size: impl Into<Vec2<usize>>) -> Self

Set the display position to zero and use the specified size for this image.

Trait Implementations

impl Clone for ImageAttributes

fn clone(&self) -> Self

impl Debug for ImageAttributes

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl PartialEq for ImageAttributes

fn eq(&self, other: &Self) -> bool

impl StructuralPartialEq for ImageAttributes

Auto Trait Implementations

impl Freeze for ImageAttributes

impl RefUnwindSafe for ImageAttributes

impl Send for ImageAttributes

impl Sync for ImageAttributes

impl Unpin for ImageAttributes

impl UnsafeUnpin for ImageAttributes

impl UnwindSafe for ImageAttributes

Blanket Implementations

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for ImageAttributes where ST: ?Sized, DT: ?Sized,

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for ImageAttributes where ST: ?Sized, DT: ?Sized,

impl<T> Any for ImageAttributes where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for ImageAttributes where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for ImageAttributes where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for ImageAttributes where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for ImageAttributes

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Pointable for ImageAttributes

const ALIGN: usize = _;
type Init = T;
unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

impl<T> Read<Exclusive, BecauseExclusive> for ImageAttributes where T: ?Sized,

impl<T> ToOwned for ImageAttributes where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for ImageAttributes where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for ImageAttributes where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for ImageAttributes where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>