Skip to main content

ResolveCtx

Struct ResolveCtx 

Source
pub struct ResolveCtx<'a> {
    pub theme: &'a CT_OfficeStyleSheet,
    pub color_map: ColorMap,
    pub master: &'a CT_SlideMaster,
    pub layout: &'a CT_SlideLayout,
    pub slide: &'a CT_Slide,
    pub default_text_style: &'a CT_TextListStyle,
    pub table_styles: Option<&'a CT_TableStyleList>,
    /* private fields */
}
Expand description

The fixed presentation hierarchy and theme inputs for resolving one slide.

Fields§

§theme: &'a CT_OfficeStyleSheet§color_map: ColorMap§master: &'a CT_SlideMaster§layout: &'a CT_SlideLayout§slide: &'a CT_Slide§default_text_style: &'a CT_TextListStyle§table_styles: Option<&'a CT_TableStyleList>

Implementations§

Source§

impl<'a> ResolveCtx<'a>

Source

pub fn new( theme: &'a CT_OfficeStyleSheet, color_map: ColorMap, master: &'a CT_SlideMaster, layout: &'a CT_SlideLayout, slide: &'a CT_Slide, default_text_style: &'a CT_TextListStyle, ) -> Self

Source

pub fn with_table_styles(self, table_styles: &'a CT_TableStyleList) -> Self

Adds the optional ppt/tableStyles.xml projection used by table frames.

Source

pub fn effective_xfrm(&self, shape: &CT_Shape) -> Option<CT_Transform2D>

Resolves an owned transform from the slide, layout, then master shape.

Source

pub fn effective_picture_xfrm( &self, picture: &CT_Picture, ) -> Option<CT_Transform2D>

Resolves picture bounds from the slide picture, layout placeholder, then master placeholder.

Source

pub fn effective_body_pr(&self, shape: &CT_Shape) -> CT_TextBodyProperties

Resolves body properties per field over defaults, master, layout, and slide.

Source

pub fn effective_background(&self) -> Option<EffectiveBackground<'_>>

Selects the first background in slide, layout, and master order.

Source

pub fn flatten(&self) -> Vec<FlattenedItem<'_>>

Returns background and shape-tree leaves in final draw order.

Source

pub fn resolve_slide( &self, size: (f64, f64), ) -> Result<ResolvedSlide, ResolveError>

Resolves one owned renderer-facing slide at the supplied point size.

Source

pub fn resolve_slide_at( &self, size: (f64, f64), position: TimelinePosition, ) -> Result<ResolvedTimelineSlide, ResolveError>

Resolves one slide through the additive slide-local timeline path.

Source

pub fn resolve_slide_with_media( &self, size: (f64, f64), media: &ScopedMediaIds, ) -> Result<ResolvedSlide, ResolveError>

Resolves one slide using embedded media identifiers scoped to source parts.

Source

pub fn resolve_slide_with_resources( &self, size: (f64, f64), media: &ScopedMediaIds, hyperlinks: &ScopedHyperlinkTargets, ) -> Result<ResolvedSlide, ResolveError>

Resolves one slide with source-scoped media and external hyperlink targets.

Source

pub fn resolve_slide_with_chart_resources( &self, size: (f64, f64), media: &ScopedMediaIds, hyperlinks: &ScopedHyperlinkTargets, charts: &ScopedChartResources, fonts: &mut FontManager, ) -> Result<ResolvedSlide, ResolveError>

Resolves one slide with source-scoped charts and the caller’s font manager.

Source

pub fn resolve_slide_with_chart_resources_and_text_directions( &self, size: (f64, f64), media: &ScopedMediaIds, hyperlinks: &ScopedHyperlinkTargets, charts: &ScopedChartResources, fonts: &mut FontManager, ) -> Result<(ResolvedSlide, ResolvedSlideTextDirections), ResolveError>

Resolves one slide and returns paragraph directions in shape and text-body order.

The outer vector follows ResolvedSlide::shapes. Each shape entry contains one paragraph-direction vector for a text shape, or one entry per table cell in row-major order. Non-text shapes have an empty entry.

Source

pub fn resolve_slide_with_chart_resources_and_text_directions_at( &self, size: (f64, f64), media: &ScopedMediaIds, hyperlinks: &ScopedHyperlinkTargets, charts: &ScopedChartResources, fonts: &mut FontManager, position: TimelinePosition, ) -> Result<(ResolvedTimelineSlide, ResolvedSlideTextDirections), ResolveError>

Resolves one timestamped slide while retaining text directions and target identity.

Source§

impl ResolveCtx<'_>

Source

pub fn resolve_typeface(&self, typeface: &str, script: Option<&str>) -> String

Resolves a DrawingML theme typeface token to a concrete font face.

A supplied ISO 15924 script selects the first matching supplemental face in document order. Ordinary faces and unknown tokens pass through unchanged.

Source§

impl ResolveCtx<'_>

Source

pub fn effective_shape_style( &self, shape: &CT_Shape, ) -> Result<EffectiveShapeStyle, ResolveError>

Resolves one ordinary shape’s modelled theme and direct style properties.

Source§

impl ResolveCtx<'_>

Source

pub fn effective_list_style(&self, shape: &CT_Shape) -> EffectiveListStyle

Resolves sources one through six for every list level of one shape.

Source

pub fn effective_text_properties( &self, shape: &CT_Shape, paragraph: Option<&CT_TextParagraphProperties>, run: Option<&CT_TextCharacterProperties>, ) -> EffectiveTextProperties

Applies paragraph and run properties to the selected zero-based level.

Auto Trait Implementations§

§

impl<'a> !Freeze for ResolveCtx<'a>

§

impl<'a> !RefUnwindSafe for ResolveCtx<'a>

§

impl<'a> !Sync for ResolveCtx<'a>

§

impl<'a> Send for ResolveCtx<'a>

§

impl<'a> Unpin for ResolveCtx<'a>

§

impl<'a> UnsafeUnpin for ResolveCtx<'a>

§

impl<'a> UnwindSafe for ResolveCtx<'a>

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> ErasedDestructor for T
where T: 'static,

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, 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.