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>
impl<'a> ResolveCtx<'a>
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
Sourcepub fn with_table_styles(self, table_styles: &'a CT_TableStyleList) -> Self
pub fn with_table_styles(self, table_styles: &'a CT_TableStyleList) -> Self
Adds the optional ppt/tableStyles.xml projection used by table frames.
Sourcepub fn effective_xfrm(&self, shape: &CT_Shape) -> Option<CT_Transform2D>
pub fn effective_xfrm(&self, shape: &CT_Shape) -> Option<CT_Transform2D>
Resolves an owned transform from the slide, layout, then master shape.
Sourcepub fn effective_picture_xfrm(
&self,
picture: &CT_Picture,
) -> Option<CT_Transform2D>
pub fn effective_picture_xfrm( &self, picture: &CT_Picture, ) -> Option<CT_Transform2D>
Resolves picture bounds from the slide picture, layout placeholder, then master placeholder.
Sourcepub fn effective_body_pr(&self, shape: &CT_Shape) -> CT_TextBodyProperties
pub fn effective_body_pr(&self, shape: &CT_Shape) -> CT_TextBodyProperties
Resolves body properties per field over defaults, master, layout, and slide.
Sourcepub fn effective_background(&self) -> Option<EffectiveBackground<'_>>
pub fn effective_background(&self) -> Option<EffectiveBackground<'_>>
Selects the first background in slide, layout, and master order.
Sourcepub fn flatten(&self) -> Vec<FlattenedItem<'_>>
pub fn flatten(&self) -> Vec<FlattenedItem<'_>>
Returns background and shape-tree leaves in final draw order.
Sourcepub fn owned_items(
&self,
source: FlattenedSource,
) -> Vec<(Vec<usize>, FlattenedItem<'_>)>
pub fn owned_items( &self, source: FlattenedSource, ) -> Vec<(Vec<usize>, FlattenedItem<'_>)>
Enumerates physical leaves without visibility or placeholder filtering. Child paths retain source ordinals, including nested groups. Opaque alternate content stays an explicit leaf rather than a writable fallback.
Sourcepub fn resolve_slide(
&self,
size: (f64, f64),
) -> Result<ResolvedSlide, ResolveError>
pub fn resolve_slide( &self, size: (f64, f64), ) -> Result<ResolvedSlide, ResolveError>
Resolves one owned renderer-facing slide at the supplied point size.
Sourcepub fn resolve_slide_at(
&self,
size: (f64, f64),
position: TimelinePosition,
) -> Result<ResolvedTimelineSlide, ResolveError>
pub fn resolve_slide_at( &self, size: (f64, f64), position: TimelinePosition, ) -> Result<ResolvedTimelineSlide, ResolveError>
Resolves one slide through the additive slide-local timeline path.
Sourcepub fn resolve_slide_with_media(
&self,
size: (f64, f64),
media: &ScopedMediaIds,
) -> Result<ResolvedSlide, ResolveError>
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.
Sourcepub fn resolve_slide_with_resources(
&self,
size: (f64, f64),
media: &ScopedMediaIds,
hyperlinks: &ScopedHyperlinkTargets,
) -> Result<ResolvedSlide, ResolveError>
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.
Sourcepub fn resolve_slide_with_chart_resources(
&self,
size: (f64, f64),
media: &ScopedMediaIds,
hyperlinks: &ScopedHyperlinkTargets,
charts: &ScopedChartResources,
fonts: &mut FontManager,
) -> Result<ResolvedSlide, ResolveError>
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.
Sourcepub 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>
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.
Sourcepub fn resolve_owned_text_shape(
&self,
item: FlattenedItem<'_>,
size: (f64, f64),
hyperlinks: &ScopedHyperlinkTargets,
) -> Result<(ResolvedSlide, ResolvedSlideTextDirections), ResolveError>
pub fn resolve_owned_text_shape( &self, item: FlattenedItem<'_>, size: (f64, f64), hyperlinks: &ScopedHyperlinkTargets, ) -> Result<(ResolvedSlide, ResolvedSlideTextDirections), ResolveError>
Resolve a physically owned text shape even when draw flattening hides its placeholder. Explicit autofit inventory and its read-only report need the same producing scope and inheritance as visible rendering.
Sourcepub 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>
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<'_>
impl ResolveCtx<'_>
Sourcepub fn resolve_typeface(&self, typeface: &str, script: Option<&str>) -> String
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<'_>
impl ResolveCtx<'_>
Sourcepub fn effective_shape_style(
&self,
shape: &CT_Shape,
) -> Result<EffectiveShapeStyle, ResolveError>
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<'_>
impl ResolveCtx<'_>
Sourcepub fn effective_list_style(&self, shape: &CT_Shape) -> EffectiveListStyle
pub fn effective_list_style(&self, shape: &CT_Shape) -> EffectiveListStyle
Resolves sources one through six for every list level of one shape.
Sourcepub fn effective_text_properties(
&self,
shape: &CT_Shape,
paragraph: Option<&CT_TextParagraphProperties>,
run: Option<&CT_TextCharacterProperties>,
) -> EffectiveTextProperties
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.