Skip to main content

Composite

Struct Composite 

Source
pub struct Composite { /* private fields */ }
Expand description

One completed, immutable composition, retaining its first coordinate frame.

Implementations§

Source§

impl Composite

Source

pub fn new( base: impl TryInto>, items: impl IntoIterator<Item = Placement>, ) -> Result<Composite, Error>

Compose ordered items on a base, with its original viewport unchanged.

Source

pub fn with_options( base: impl TryInto>, items: impl IntoIterator<Item = Placement>, options: ComposeOptions, ) -> Result<Composite, Error>

Compose using the requested viewport policy.

Source

pub fn with_operation( base: impl TryInto>, items: impl IntoIterator<Item = Placement>, options: ComposeOptions, operation_options: &OperationOptions, ) -> Result<Composite, Error>

Compose one independent request, retaining cancellation through capture and all new item preparations.

Source

pub fn in_slot( base: impl TryInto>, item: impl TryInto>, row: usize, column: usize, ) -> Result<Composite, Error>

Put one independently prepared item into an actual reserved slot.

Source

pub fn output(&self) -> &Output

Borrow the complete frozen output, without preparing or converting it.

Source

pub fn width(&self) -> f64

Final CSS width.

Source

pub fn height(&self) -> f64

Final CSS height.

Source

pub fn layout_report(&self) -> Result<&LayoutReport, Error>

The original native base’s accepted report, if it has one.

Source

pub fn base_origin_in_output(&self) -> (f64, f64)

Position of the original base’s top-left in this completed output.

Source

pub fn default_png_sizing(&self) -> PngSizing

The chain’s default PNG sampling when no sizing was requested.

Source

pub fn svg(&self, path: impl AsRef<Path>) -> Result<Output, Error>

Publish the completed outlined SVG.

Source

pub fn svg_with_operation( &self, path: impl AsRef<Path>, options: &OperationOptions, ) -> Result<Output, Error>

Publish outlined SVG using this call’s operation options.

Source

pub fn svg_preserve_text(&self, path: impl AsRef<Path>) -> Result<Output, Error>

Publish with actual retained text.

Source

pub fn svg_preserve_text_with_operation( &self, path: impl AsRef<Path>, options: &OperationOptions, ) -> Result<Output, Error>

Publish retained text using this call’s operation options.

Source

pub fn png(&self, path: impl AsRef<Path>) -> Result<Output, Error>

Publish with the chain’s default PNG sampling (1× for a flat base, 300 DPI for a native base).

Source

pub fn png_with_operation( &self, path: impl AsRef<Path>, options: &OperationOptions, ) -> Result<Output, Error>

Publish the default PNG with operation options.

Source

pub fn png_with_options( &self, path: impl AsRef<Path>, options: PngOptions, ) -> Result<Output, Error>

Publish an explicit PNG sampling/encoding request.

Source

pub fn png_with_options_with_operation( &self, path: impl AsRef<Path>, options: PngOptions, operation: &OperationOptions, ) -> Result<Output, Error>

Publish explicit device sizing with this call’s operation options.

Source

pub fn png_preview(&self, path: impl AsRef<Path>) -> Result<Output, Error>

Publish a source-sized PNG.

Source

pub fn png_preview_with_operation( &self, path: impl AsRef<Path>, options: &OperationOptions, ) -> Result<Output, Error>

Publish a source-sized PNG using this call’s operation options.

Source§

impl Composite

Source

pub fn compose( &self, items: impl IntoIterator<Item = Placement>, ) -> Result<Composite, Error>

Compose independently prepared items on this base.

Source

pub fn compose_with_options( &self, items: impl IntoIterator<Item = Placement>, options: ComposeOptions, ) -> Result<Composite, Error>

Compose using an explicit viewport policy.

Source

pub fn compose_with_operation( &self, items: impl IntoIterator<Item = Placement>, options: ComposeOptions, operation: &OperationOptions, ) -> Result<Composite, Error>

Compose with this call’s cancellation and viewport policy.

Source§

impl Composite

Source

pub fn save_with( &self, path: impl AsRef<Path>, format: impl Into<Format>, ) -> Result<Output, Error>

Publish one complete image atomically, according to the selected device. The returned Output is the complete immutable scene.

Source

pub fn save_with_operation( &self, path: impl AsRef<Path>, format: impl Into<Format>, options: &OperationOptions, ) -> Result<Output, Error>

Publish a file under one operation, from preparation through install.

Source

pub fn encode(&self, format: impl Into<Format>) -> Result<Arc<[u8]>, Error>

Encode a complete device artifact in immutable owned memory.

Source

pub fn encode_with_operation( &self, format: impl Into<Format>, options: &OperationOptions, ) -> Result<Arc<[u8]>, Error>

Encode in memory under this call’s operation options.

Source

pub fn write_to( &self, writer: &mut dyn Write, format: impl Into<Format>, ) -> Result<Output, Error>

Write one complete artifact at the writer’s current position. A failed external write may report a confirmed prefix.

Source

pub fn write_to_with_operation( &self, writer: &mut dyn Write, format: impl Into<Format>, options: &OperationOptions, ) -> Result<Output, Error>

Write to a borrowed stream under one operation.

Source

pub fn pixels(&self) -> Result<PixelBuffer, Error>

Read source-sized, straight RGBA8 samples of the complete scene.

Source

pub fn pixels_with_options( &self, options: PixelOptions, ) -> Result<PixelBuffer, Error>

Read immutable samples with explicit sampling and representation.

Source

pub fn pixels_with_options_with_operation( &self, options: PixelOptions, operation_options: &OperationOptions, ) -> Result<PixelBuffer, Error>

Read immutable samples using this call’s operation options.

Source

pub fn pixels_into(&self, target: PixelTarget<'_>) -> Result<(), Error>

Fill the actual logical pixels of a caller-owned buffer.

Source

pub fn pixels_into_with_options( &self, target: PixelTarget<'_>, options: PixelOptions, ) -> Result<(), Error>

Fill a caller-owned target using the requested pixel options.

Source

pub fn pixels_into_with_options_with_operation( &self, target: PixelTarget<'_>, options: PixelOptions, operation_options: &OperationOptions, ) -> Result<(), Error>

Fill a caller-owned target in one cancellable operation.

Trait Implementations§

Source§

impl Clone for Composite

Source§

fn clone(&self) -> Composite

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Composite

Source§

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

Formats the value using the given formatter. Read more
Source§

impl From<&Composite> for CompositionSource

Source§

fn from(composite: &Composite) -> CompositionSource

Converts to this type from the input type.
Source§

impl From<&Composite> for PanelImage

Source§

fn from(value: &Composite) -> PanelImage

Converts to this type from the input type.
Source§

impl From<Composite> for CompositionSource

Source§

fn from(composite: Composite) -> CompositionSource

Converts to this type from the input type.
Source§

impl From<Composite> for PanelImage

Source§

fn from(value: Composite) -> PanelImage

Converts to this type from the input type.
Source§

impl TryFrom<&Composite> for PanelContent

Source§

type Error = Error

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

fn try_from(value: &Composite) -> Result<PanelContent, Error>

Performs the conversion.
Source§

impl TryFrom<Composite> for PanelContent

Source§

type Error = Error

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

fn try_from(value: Composite) -> Result<PanelContent, Error>

Performs the conversion.

Auto Trait Implementations§

§

impl Forget for Composite

§

impl Freeze for Composite
where *const ArcInner<RenderedScene> is !null: Freeze, PhantomData<ArcInner<RenderedScene>>: Freeze,

§

impl Move for Composite

§

impl RefUnwindSafe for Composite

§

impl Send for Composite
where Arc<RenderedScene>: Send,

§

impl Sync for Composite
where Arc<RenderedScene>: Sync,

§

impl Unpin for Composite
where Arc<RenderedScene>: Unpin,

§

impl UnsafeUnpin for Composite
where *const ArcInner<RenderedScene> is !null: UnsafeUnpin, PhantomData<ArcInner<RenderedScene>>: UnsafeUnpin,

§

impl UnwindSafe for Composite
where Arc<RenderedScene>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

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

Source§

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

Source§

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

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V