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 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_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.
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 five 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.