[−][src]Struct oox::shared::drawingml::shapedefs::CustomGeometry2D
Fields
adjust_value_list: Option<GeomGuideList>
This element specifies the adjust values that are applied to the specified shape. An adjust value is simply a guide that has a value based formula specified. That is, no calculation takes place for an adjust value guide. Instead, this guide specifies a parameter value that is used for calculations within the shape guides.
Xml example
<a:xfrm>
<a:off x="3200400" y="1600200"/>
<a:ext cx="1705233" cy="679622"/>
</a:xfrm>
<a:custGeom>
<a:avLst>
<a:gd name="myGuide" fmla="val 2"/>
</a:avLst>
<a:gdLst/>
<a:ahLst/>
<a:cxnLst/>
<a:rect l="0" t="0" r="0" b="0"/>
<a:pathLst>
<a:path w="2" h="2">
<a:moveTo>
<a:pt x="0" y="myGuide"/>
</a:moveTo>
<a:lnTo>
<a:pt x="2" y="myGuide"/>
</a:lnTo>
<a:lnTo>
<a:pt x="1" y="0"/>
</a:lnTo>
<a:close/>
</a:path>
</a:pathLst>
</a:custGeom>
guide_list: Option<GeomGuideList>
This element specifies all the guides that are used for this shape. A guide is specified by the gd element and defines a calculated value that can be used for the construction of the corresponding shape.
Note
Guides that have a literal value formula specified via fmla="val x" above should only be used within the adjust_value_list as an adjust value for the shape. This however is not strictly enforced.
adjust_handle_list: Option<Vec<AdjustHandle>>
This element specifies the adjust handles that are applied to a custom geometry. These adjust handles specify points within the geometric shape that can be used to perform certain transform operations on the shape.
Example
Consider the scenario where a custom geometry, an arrow in this case, has been drawn and adjust handles have been placed at the top left corner of both the arrow head and arrow body. The user interface can then be made to transform only certain parts of the shape by using the corresponding adjust handle.
For instance if the user wished to change only the width of the arrow head then they would use the adjust handle located on the top left of the arrow head.
connection_site_list: Option<Vec<ConnectionSite>>
This element specifies all the connection sites that are used for this shape. A connection site is specified by defining a point within the shape bounding box that can have a cxnSp element attached to it. These connection sites are specified using the shape coordinate system that is specified within the ext transform element.
rect: Option<Box<GeomRect>>
This element specifies the rectangular bounding box for text within a custGeom shape. The default for this rectangle is the bounding box for the shape. This can be modified using this elements four attributes to inset or extend the text bounding box.
Note
Text specified to reside within this shape text rectangle can flow outside this bounding box. Depending on the autofit options within the txBody element the text might not entirely reside within this shape text rectangle.
path_list: Vec<Path2D>
This element specifies the entire path that is to make up a single geometric shape. The path_list can consist of many individual paths within it.
Xml example
<a:custGeom>
<a:pathLst>
<a:path w="2824222" h="590309">
<a:moveTo>
<a:pt x="0" y="428263"/>
</a:moveTo>
<a:lnTo>
<a:pt x="1620455" y="590309"/>
</a:lnTo>
<a:lnTo>
<a:pt x="2824222" y="173620"/>
</a:lnTo>
<a:lnTo>
<a:pt x="1562582" y="0"/>
</a:lnTo>
<a:close/>
</a:path>
</a:pathLst>
</a:custGeom>
In the above example there is specified a four sided geometric shape that has all straight sides. While we only see three lines being drawn via the lnTo element there are actually four sides because the last point of (x=1562585, y=0) is connected to the first point in the creation path via a lnTo element.
Note
A geometry with multiple paths within it should be treated visually as if each path were a distinct shape. That is each creation path has its first point and last point joined to form a closed shape. However, the generating application should then connect the last point to the first point of the new shape. If a close element is encountered at the end of the previous creation path then this joining line should not be rendered by the generating application. The rendering should resume with the first line or curve on the new creation path.
Methods
impl CustomGeometry2D
[src]
pub fn from_xml_element(xml_node: &XmlNode) -> Result<Self>
[src]
Trait Implementations
impl Clone for CustomGeometry2D
[src]
fn clone(&self) -> CustomGeometry2D
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for CustomGeometry2D
[src]
impl Default for CustomGeometry2D
[src]
fn default() -> CustomGeometry2D
[src]
impl PartialEq<CustomGeometry2D> for CustomGeometry2D
[src]
fn eq(&self, other: &CustomGeometry2D) -> bool
[src]
fn ne(&self, other: &CustomGeometry2D) -> bool
[src]
impl StructuralPartialEq for CustomGeometry2D
[src]
Auto Trait Implementations
impl RefUnwindSafe for CustomGeometry2D
impl Send for CustomGeometry2D
impl Sync for CustomGeometry2D
impl Unpin for CustomGeometry2D
impl UnwindSafe for CustomGeometry2D
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,