pub struct Composite { /* private fields */ }Expand description
One completed, immutable composition, retaining its first coordinate frame.
Implementations§
Source§impl Composite
impl Composite
Sourcepub fn new(
base: impl TryInto<CompositionSource, Error: Into<Error>>,
items: impl IntoIterator<Item = Placement>,
) -> Result<Self>
pub fn new( base: impl TryInto<CompositionSource, Error: Into<Error>>, items: impl IntoIterator<Item = Placement>, ) -> Result<Self>
Compose ordered items on a base, with its original viewport unchanged.
Sourcepub fn with_options(
base: impl TryInto<CompositionSource, Error: Into<Error>>,
items: impl IntoIterator<Item = Placement>,
options: ComposeOptions,
) -> Result<Self>
pub fn with_options( base: impl TryInto<CompositionSource, Error: Into<Error>>, items: impl IntoIterator<Item = Placement>, options: ComposeOptions, ) -> Result<Self>
Compose using the requested viewport policy.
Sourcepub fn with_operation(
base: impl TryInto<CompositionSource, Error: Into<Error>>,
items: impl IntoIterator<Item = Placement>,
options: ComposeOptions,
operation_options: &OperationOptions,
) -> Result<Self>
pub fn with_operation( base: impl TryInto<CompositionSource, Error: Into<Error>>, items: impl IntoIterator<Item = Placement>, options: ComposeOptions, operation_options: &OperationOptions, ) -> Result<Self>
Compose one independent request, retaining cancellation through capture and all new item preparations.
Sourcepub fn in_slot(
base: impl TryInto<CompositionSource, Error: Into<Error>>,
item: impl TryInto<CompositionSource, Error: Into<Error>>,
row: usize,
column: usize,
) -> Result<Self>
pub fn in_slot( base: impl TryInto<CompositionSource, Error: Into<Error>>, item: impl TryInto<CompositionSource, Error: Into<Error>>, row: usize, column: usize, ) -> Result<Self>
Put one independently prepared item into an actual reserved slot.
Sourcepub fn output(&self) -> &Output
pub fn output(&self) -> &Output
Borrow the complete frozen output, without preparing or converting it.
Sourcepub fn layout_report(&self) -> Result<&LayoutReport>
pub fn layout_report(&self) -> Result<&LayoutReport>
The original native base’s accepted report, if it has one.
Sourcepub fn base_origin_in_output(&self) -> (f64, f64)
pub fn base_origin_in_output(&self) -> (f64, f64)
Position of the original base’s top-left in this completed output.
Sourcepub fn default_png_sizing(&self) -> PngSizing
pub fn default_png_sizing(&self) -> PngSizing
The chain’s default PNG sampling when no sizing was requested.
Sourcepub fn svg(&self, path: impl AsRef<Path>) -> Result<Output>
pub fn svg(&self, path: impl AsRef<Path>) -> Result<Output>
Publish the completed outlined SVG.
Sourcepub fn svg_with_operation(
&self,
path: impl AsRef<Path>,
options: &OperationOptions,
) -> Result<Output>
pub fn svg_with_operation( &self, path: impl AsRef<Path>, options: &OperationOptions, ) -> Result<Output>
Publish outlined SVG using this call’s operation options.
Sourcepub fn svg_preserve_text(&self, path: impl AsRef<Path>) -> Result<Output>
pub fn svg_preserve_text(&self, path: impl AsRef<Path>) -> Result<Output>
Publish with actual retained text.
Sourcepub fn svg_preserve_text_with_operation(
&self,
path: impl AsRef<Path>,
options: &OperationOptions,
) -> Result<Output>
pub fn svg_preserve_text_with_operation( &self, path: impl AsRef<Path>, options: &OperationOptions, ) -> Result<Output>
Publish retained text using this call’s operation options.
Sourcepub fn png(&self, path: impl AsRef<Path>) -> Result<Output>
pub fn png(&self, path: impl AsRef<Path>) -> Result<Output>
Publish with the chain’s default PNG sampling (1× for a flat base, 300 DPI for a native base).
Sourcepub fn png_with_operation(
&self,
path: impl AsRef<Path>,
options: &OperationOptions,
) -> Result<Output>
pub fn png_with_operation( &self, path: impl AsRef<Path>, options: &OperationOptions, ) -> Result<Output>
Publish the default PNG with operation options.
Sourcepub fn png_with_options(
&self,
path: impl AsRef<Path>,
options: PngOptions,
) -> Result<Output>
pub fn png_with_options( &self, path: impl AsRef<Path>, options: PngOptions, ) -> Result<Output>
Publish an explicit PNG sampling/encoding request.
Sourcepub fn png_with_options_with_operation(
&self,
path: impl AsRef<Path>,
options: PngOptions,
operation: &OperationOptions,
) -> Result<Output>
pub fn png_with_options_with_operation( &self, path: impl AsRef<Path>, options: PngOptions, operation: &OperationOptions, ) -> Result<Output>
Publish explicit device sizing with this call’s operation options.
Sourcepub fn png_preview(&self, path: impl AsRef<Path>) -> Result<Output>
pub fn png_preview(&self, path: impl AsRef<Path>) -> Result<Output>
Publish a source-sized PNG.
Sourcepub fn png_preview_with_operation(
&self,
path: impl AsRef<Path>,
options: &OperationOptions,
) -> Result<Output>
pub fn png_preview_with_operation( &self, path: impl AsRef<Path>, options: &OperationOptions, ) -> Result<Output>
Publish a source-sized PNG using this call’s operation options.
Source§impl Composite
impl Composite
Sourcepub fn compose(
&self,
items: impl IntoIterator<Item = Placement>,
) -> Result<Composite>
pub fn compose( &self, items: impl IntoIterator<Item = Placement>, ) -> Result<Composite>
Compose independently prepared items on this base.
Sourcepub fn compose_with_options(
&self,
items: impl IntoIterator<Item = Placement>,
options: ComposeOptions,
) -> Result<Composite>
pub fn compose_with_options( &self, items: impl IntoIterator<Item = Placement>, options: ComposeOptions, ) -> Result<Composite>
Compose using an explicit viewport policy.
Sourcepub fn compose_with_operation(
&self,
items: impl IntoIterator<Item = Placement>,
options: ComposeOptions,
operation: &OperationOptions,
) -> Result<Composite>
pub fn compose_with_operation( &self, items: impl IntoIterator<Item = Placement>, options: ComposeOptions, operation: &OperationOptions, ) -> Result<Composite>
Compose with this call’s cancellation and viewport policy.
Source§impl Composite
impl Composite
Sourcepub fn save_with(
&self,
path: impl AsRef<Path>,
format: impl Into<Format>,
) -> Result<Output>
pub fn save_with( &self, path: impl AsRef<Path>, format: impl Into<Format>, ) -> Result<Output>
Publish one complete image atomically, according to the selected device. The returned Output is the complete immutable scene.
Sourcepub fn save_with_operation(
&self,
path: impl AsRef<Path>,
format: impl Into<Format>,
options: &OperationOptions,
) -> Result<Output>
pub fn save_with_operation( &self, path: impl AsRef<Path>, format: impl Into<Format>, options: &OperationOptions, ) -> Result<Output>
Publish a file under one operation, from preparation through install.
Sourcepub fn encode(&self, format: impl Into<Format>) -> Result<Arc<[u8]>>
pub fn encode(&self, format: impl Into<Format>) -> Result<Arc<[u8]>>
Encode a complete device artifact in immutable owned memory.
Sourcepub fn encode_with_operation(
&self,
format: impl Into<Format>,
options: &OperationOptions,
) -> Result<Arc<[u8]>>
pub fn encode_with_operation( &self, format: impl Into<Format>, options: &OperationOptions, ) -> Result<Arc<[u8]>>
Encode in memory under this call’s operation options.
Sourcepub fn write_to(
&self,
writer: &mut dyn Write,
format: impl Into<Format>,
) -> Result<Output>
pub fn write_to( &self, writer: &mut dyn Write, format: impl Into<Format>, ) -> Result<Output>
Write one complete artifact at the writer’s current position. A failed external write may report a confirmed prefix.
Sourcepub fn write_to_with_operation(
&self,
writer: &mut dyn Write,
format: impl Into<Format>,
options: &OperationOptions,
) -> Result<Output>
pub fn write_to_with_operation( &self, writer: &mut dyn Write, format: impl Into<Format>, options: &OperationOptions, ) -> Result<Output>
Write to a borrowed stream under one operation.
Sourcepub fn pixels(&self) -> Result<PixelBuffer>
pub fn pixels(&self) -> Result<PixelBuffer>
Read source-sized, straight RGBA8 samples of the complete scene.
Sourcepub fn pixels_with_options(&self, options: PixelOptions) -> Result<PixelBuffer>
pub fn pixels_with_options(&self, options: PixelOptions) -> Result<PixelBuffer>
Read immutable samples with explicit sampling and representation.
Sourcepub fn pixels_with_options_with_operation(
&self,
options: PixelOptions,
operation_options: &OperationOptions,
) -> Result<PixelBuffer>
pub fn pixels_with_options_with_operation( &self, options: PixelOptions, operation_options: &OperationOptions, ) -> Result<PixelBuffer>
Read immutable samples using this call’s operation options.
Sourcepub fn pixels_into(&self, target: PixelTarget<'_>) -> Result<()>
pub fn pixels_into(&self, target: PixelTarget<'_>) -> Result<()>
Fill the actual logical pixels of a caller-owned buffer.
Sourcepub fn pixels_into_with_options(
&self,
target: PixelTarget<'_>,
options: PixelOptions,
) -> Result<()>
pub fn pixels_into_with_options( &self, target: PixelTarget<'_>, options: PixelOptions, ) -> Result<()>
Fill a caller-owned target using the requested pixel options.
Sourcepub fn pixels_into_with_options_with_operation(
&self,
target: PixelTarget<'_>,
options: PixelOptions,
operation_options: &OperationOptions,
) -> Result<()>
pub fn pixels_into_with_options_with_operation( &self, target: PixelTarget<'_>, options: PixelOptions, operation_options: &OperationOptions, ) -> Result<()>
Fill a caller-owned target in one cancellable operation.
Trait Implementations§
Source§impl From<&Composite> for CompositionSource
impl From<&Composite> for CompositionSource
Source§impl From<&Composite> for PanelImage
impl From<&Composite> for PanelImage
Source§impl From<Composite> for CompositionSource
impl From<Composite> for CompositionSource
Source§impl From<Composite> for PanelImage
impl From<Composite> for PanelImage
Source§impl TryFrom<&Composite> for PanelContent
impl TryFrom<&Composite> for PanelContent
Auto Trait Implementations§
impl Forget for Composite
impl Freeze for Compositewhere
*const ArcInner<RenderedScene> is !null: Freeze,
PhantomData<ArcInner<RenderedScene>>: Freeze,
impl Move for Composite
impl RefUnwindSafe for Compositewhere
Atomic<usize>: RefUnwindSafe,
NonZero<u32>: RefUnwindSafe,
OnceLock<AssetView>: RefUnwindSafe,
OnceLock<Arc<[u8]>>: RefUnwindSafe,
impl Send for Composite
impl Sync for Composite
impl Unpin for Composite
impl UnsafeUnpin for Compositewhere
*const ArcInner<RenderedScene> is !null: UnsafeUnpin,
PhantomData<ArcInner<RenderedScene>>: UnsafeUnpin,
impl UnwindSafe for Compositewhere
Arc<RenderedScene>: UnwindSafe,
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.