[][src]Enum oox::shared::drawingml::shapedefs::Geometry

pub enum Geometry {
    Custom(Box<CustomGeometry2D>),
    Preset(Box<PresetGeometry2D>),
}

Variants

This element specifies the existence of a custom geometric shape. This shape consists of a series of lines and curves described within a creation path. In addition to this there can also be adjust values, guides, adjust handles, connection sites and an inscribed rectangle specified for this custom geometric shape.

Xml example

Consider the scenario when a preset geometry does not accurately depict what must be displayed in the document. For this a custom geometry can be used to define most any 2-dimensional geometric shape.

<a:custGeom>
  <a:avLst/>
  <a:gdLst/>
  <a:ahLst/>
  <a:cxnLst/>
  <a:rect l="0" t="0" r="0" b="0"/>
  <a:pathLst>
    <a:path w="2650602" h="1261641">
      <a:moveTo>
        <a:pt x="0" y="1261641"/>
      </a:moveTo>
      <a:lnTo>
        <a:pt x="2650602" y="1261641"/>
      </a:lnTo>
      <a:lnTo>
        <a:pt x="1226916" y="0"/>
      </a:lnTo>
      <a:close/>
    </a:path>
  </a:pathLst>
</a:custGeom>

This element specifies when a preset geometric shape should be used instead of a custom geometric shape. The generating application should be able to render all preset geometries enumerated in the ShapeType enum.

Xml example

Consider the scenario when a user does not wish to specify all the lines and curves that make up the desired shape but instead chooses to use a preset geometry. The following DrawingML would specify such a case.

<p:sp>
  <p:nvSpPr>
    <p:cNvPr id="4" name="My Preset Shape"/>
    <p:cNvSpPr/>
    <p:nvPr/>
  </p:nvSpPr>
  <p:spPr>
    <a:xfrm>
      <a:off x="1981200" y="533400"/>
      <a:ext cx="1143000" cy="1066800"/>
    </a:xfrm>
    <a:prstGeom prst="heart">
    </a:prstGeom>
  </p:spPr>
</p:sp>

Trait Implementations

impl Clone for Geometry[src]

impl Debug for Geometry[src]

impl PartialEq<Geometry> for Geometry[src]

impl StructuralPartialEq for Geometry[src]

impl XsdChoice for Geometry[src]

impl XsdType for Geometry[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.