pub struct HeaderExt { /* private fields */ }
Expand description
The extended metadata of an SWF file.
This includes the SWF header data as well as metadata from the FileAttributes and SetBackgroundColor tags.
This metadata may not reflect the actual data inside a malformed SWF; for example,
the root timeline my actually contain fewer frames than HeaderExt::num_frames
if it is
corrupted.
Implementations§
Source§impl HeaderExt
impl HeaderExt
Sourcepub fn default_with_swf_version(version: u8) -> Self
pub fn default_with_swf_version(version: u8) -> Self
Returns the header for a dummy SWF file with the given SWF version.
Sourcepub fn default_error_header() -> Self
pub fn default_error_header() -> Self
Returns the header for the error state movie stub which is used if no file could be loaded or if the loaded content is no valid supported content.
Sourcepub fn default_with_uncompressed_len(length: i32) -> Self
pub fn default_with_uncompressed_len(length: i32) -> Self
Returns the header for a loaded image (JPEG, GIF or PNG).
Sourcepub fn background_color(&self) -> Option<Color>
pub fn background_color(&self) -> Option<Color>
The background color of the SWF from the SetBackgroundColor tag.
None
will be returned if the SetBackgroundColor tag was not found.
Sourcepub fn compression(&self) -> Compression
pub fn compression(&self) -> Compression
The compression format used by the SWF.
Sourcepub fn frame_rate(&self) -> Fixed8
pub fn frame_rate(&self) -> Fixed8
The frame rate of the SWF, in frames per second.
Sourcepub fn has_metadata(&self) -> bool
pub fn has_metadata(&self) -> bool
Whether this SWF contains XMP metadata in a Metadata tag.
Sourcepub fn swf_header(&self) -> &Header
pub fn swf_header(&self) -> &Header
Returns the basic SWF header.
Sourcepub fn is_action_script_3(&self) -> bool
pub fn is_action_script_3(&self) -> bool
Whether this SWF uses ActionScript 3.0 (AVM2).
Sourcepub fn num_frames(&self) -> u16
pub fn num_frames(&self) -> u16
The number of frames on the root timeline.
Sourcepub fn stage_size(&self) -> &Rectangle<Twips>
pub fn stage_size(&self) -> &Rectangle<Twips>
The stage dimensions of this SWF.
Sourcepub fn uncompressed_len(&self) -> i32
pub fn uncompressed_len(&self) -> i32
The length of the SWF after decompression.
Sourcepub fn use_direct_blit(&self) -> bool
pub fn use_direct_blit(&self) -> bool
Whether this SWF requests hardware acceleration to blit to the screen.
Sourcepub fn use_network_sandbox(&self) -> bool
pub fn use_network_sandbox(&self) -> bool
Whether this SWF should be placed in the network sandbox when run locally.
SWFs in the network sandbox can only access network resources, not local resources. SWFs in the local sandbox can only access local resources, not network resources.