RawAsepriteChunk

Enum RawAsepriteChunk 

Source
pub enum RawAsepriteChunk {
    Layer {
        flags: u16,
        layer_type: AsepriteLayerType,
        layer_child: u16,
        width: u16,
        height: u16,
        blend_mode: AsepriteBlendMode,
        opacity: u8,
        name: String,
    },
    Cel {
        layer_index: u16,
        x: i16,
        y: i16,
        opacity: u8,
        cel: RawAsepriteCel,
    },
    CelExtra {
        flags: u32,
        x: f64,
        y: f64,
        width: f64,
        height: f64,
    },
    Tags {
        tags: Vec<RawAsepriteTag>,
    },
    Palette {
        palette_size: u32,
        from_color: u32,
        to_color: u32,
        entries: Vec<RawAsepritePaletteEntry>,
    },
    UserData {
        data: RawAsepriteUserData,
    },
    Slice {
        flags: u32,
        name: String,
        slices: Vec<RawAsepriteSlice>,
    },
    ColorProfile {
        profile_type: u16,
        flags: u16,
        gamma: f64,
        icc_profile: Option<RawAsepriteIccProfile>,
    },
}
Expand description

Raw Chunk

Variants§

§

Layer

Layer Chunk

All the layer chunks determine the general layer layout

Fields

§flags: u16

The flags set for this layer

1 = Visible 2 = Editable 4 = Lock Movement 8 = Background 16 = Prefer linked cels 32 = The layer group should be displayed collapsed 64 = The layer is a reference layer

§layer_type: AsepriteLayerType

Type of the layer

§layer_child: u16

How deep the child is in the hierarchy

The higher, the deeper in the previous chunk

§width: u16

layer width

This is ignored

§height: u16

layer height

This is ignored

§blend_mode: AsepriteBlendMode

The blend mode of the layer

§opacity: u8

Opacity of this layer

§name: String

The name of the layer

§

Cel

A Cel is a container of pixel

Fields

§layer_index: u16

Which layer this cel corresponds to (0 based)

§x: i16

x position

§y: i16

y position

§opacity: u8

Opacity of the cel

§cel: RawAsepriteCel

The cel content

§

CelExtra

Extra data for the previous cel

Fields

§flags: u32

Flags for the extra cel

  • 1 = Precise bounds are set
§x: f64

Precise x position

§y: f64

Precise y position

§width: f64

precise width of the cel

§height: f64

precise height of the cel

§

Tags

Tags for this image

Fields

§tags: Vec<RawAsepriteTag>

the different tags

§

Palette

A color palette

Fields

§palette_size: u32

The total count of entries in the palette

§from_color: u32

First color index to change

§to_color: u32

Last color index to change

§entries: Vec<RawAsepritePaletteEntry>

The individual palette entries

§

UserData

User Data for the last chunk

Fields

§data: RawAsepriteUserData

the data itself

§

Slice

A slice in the image

Fields

§flags: u32

the flags for this slice

§name: String

the name of the slices

§slices: Vec<RawAsepriteSlice>

the individual slices

§

ColorProfile

An embedded color profile

Fields

§profile_type: u16

The type of color profile

§flags: u16

The flags for this color profile

1 = use the fixed gamma

§gamma: f64

Fixed gamma

§icc_profile: Option<RawAsepriteIccProfile>

An embedded ICC Profile

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more