pub struct ObjectStyleDefaults {
pub shape_definition: Option<Box<DefaultShapeDefinition>>,
pub line_definition: Option<Box<DefaultShapeDefinition>>,
pub text_definition: Option<Box<DefaultShapeDefinition>>,
}
Fields§
§shape_definition: Option<Box<DefaultShapeDefinition>>
This element defines the formatting that is associated with the default shape. The default formatting can be applied to a shape when it is initially inserted into a document.
§Xml example
<spDef>
<spPr>
<solidFill>
<schemeClr val="accent2">
<shade val="75000"/>
</schemeClr>
</solidFill>
</spPr>
<bodyPr rtlCol="0" anchor="ctr"/>
<lstStyle>
<defPPr algn="ctr">
<defRPr/>
</defPPr>
</lstStyle>
<style>
<lnRef idx="1">
<schemeClr val="accent1"/>
</lnRef>
<fillRef idx="2">
<schemeClr val="accent1"/>
</fillRef>
<effectRef idx="1">
<schemeClr val="accent1"/>
</effectRef>
<fontRef idx="minor">
<schemeClr val="dk1"/>
</fontRef>
</style>
</spDef>
In this example, we see a default shape which references a certain themed fill, line, effect, and font along with an override fill to these.
line_definition: Option<Box<DefaultShapeDefinition>>
This element defines a default line that is used within a document.
§Xml example
<lnDef>
<spPr/>
<bodyPr/>
<lstStyle/>
<style>
<lnRef idx="1">
<schemeClr val="accent2"/>
</lnRef>
<fillRef idx="0">
<schemeClr val="accent2"/>
</fillRef>
<effectRef idx="0">
<schemeClr val="accent2"/>
</effectRef>
<fontRef idx="minor">
<schemeClr val="tx1"/>
</fontRef>
</style>
</lnDef>
In this example, we see that the default line for the document is being defined as a themed line which references the subtle line style with idx equal to 1.
text_definition: Option<Box<DefaultShapeDefinition>>
This element defines the default formatting which is applied to text in a document by default. The default formatting can and should be applied to the shape when it is initially inserted into a document.
<txDef>
<spPr>
<solidFill>
<schemeClr val="accent2">
<shade val="75000"/>
</schemeClr>
</solidFill>
</spPr>
<bodyPr rtlCol="0" anchor="ctr"/>
<lstStyle>
<defPPr algn="ctr">
<defRPr/>
</defPPr>
</lstStyle>
<style>
<lnRef idx="1">
<schemeClr val="accent1"/>
</lnRef>
<fillRef idx="2">
<schemeClr val="accent1"/>
</fillRef>
<effectRef idx="1">
<schemeClr val="accent1"/>
</effectRef>
<fontRef idx="minor">
<schemeClr val="dk1"/>
</fontRef>
</style>
</txDef>
Implementations§
Source§impl ObjectStyleDefaults
impl ObjectStyleDefaults
pub fn from_xml_element(xml_node: &XmlNode) -> Result<Self>
Trait Implementations§
Source§impl Clone for ObjectStyleDefaults
impl Clone for ObjectStyleDefaults
Source§fn clone(&self) -> ObjectStyleDefaults
fn clone(&self) -> ObjectStyleDefaults
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ObjectStyleDefaults
impl Debug for ObjectStyleDefaults
Source§impl Default for ObjectStyleDefaults
impl Default for ObjectStyleDefaults
Source§fn default() -> ObjectStyleDefaults
fn default() -> ObjectStyleDefaults
Returns the “default value” for a type. Read more
Source§impl PartialEq for ObjectStyleDefaults
impl PartialEq for ObjectStyleDefaults
impl StructuralPartialEq for ObjectStyleDefaults
Auto Trait Implementations§
impl Freeze for ObjectStyleDefaults
impl RefUnwindSafe for ObjectStyleDefaults
impl Send for ObjectStyleDefaults
impl Sync for ObjectStyleDefaults
impl Unpin for ObjectStyleDefaults
impl UnwindSafe for ObjectStyleDefaults
Blanket Implementations§
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
Mutably borrows from an owned value. Read more