Skip to main content

PresetGeometry

Enum PresetGeometry 

Source
pub enum PresetGeometry {
Show 56 variants Rectangle, RoundRectangle, Ellipse, Line, RightTriangle, Diamond, Parallelogram, Trapezoid, Hexagon, Octagon, Star5, Star6, Star10, Arrow, RightArrow, LeftArrow, UpArrow, DownArrow, BentArrow, CurvedRightArrow, Callout1, Callout2, Cloud, Heart, LightningBolt, Sun, Moon, SmileyFace, Donut, Cube, Can, Bevel, NoSmoking, BlockArc, Plus, Minus, Plaque, Wave, Pie, Bevel2, FoldedCorner, Pentagon, Chevron, RightBracket, LeftBracket, DoubleBracket, StraightConnector1, BentConnector2, BentConnector3, BentConnector4, BentConnector5, CurvedConnector2, CurvedConnector3, CurvedConnector4, CurvedConnector5, Other,
}
Expand description

几何预设形状名(prstGeom prst="...")。

仅包含 python-pptx 文档过的常用子集,足以应付大部分 case。 全部 200+ 形状见 ECMA-376 Part 1, §19.3 起的 ST_PresetShape

Variants§

§

Rectangle

矩形。

§

RoundRectangle

圆角矩形。

§

Ellipse

椭圆。

§

Line

直线。

§

RightTriangle

直角三角形。

§

Diamond

菱形。

§

Parallelogram

平行四边形。

§

Trapezoid

梯形。

§

Hexagon

六边形。

§

Octagon

八边形。

§

Star5

五角星。

§

Star6

六角星。

§

Star10

十角星。

§

Arrow

普通箭头。

§

RightArrow

右箭头。

§

LeftArrow

左箭头。

§

UpArrow

上箭头。

§

DownArrow

下箭头。

§

BentArrow

弯箭头。

§

CurvedRightArrow

弧形右箭头。

§

Callout1

矩形标注。

§

Callout2

圆角矩形标注。

§

Cloud

云形。

§

Heart

心形。

§

LightningBolt

闪电。

§

Sun

太阳。

§

Moon

月亮。

§

SmileyFace

笑脸。

§

Donut

甜甜圈。

§

Cube

立方体。

§

Can

圆柱。

§

Bevel

斜面。

§

NoSmoking

禁止符号。

§

BlockArc

弧块。

§

Plus

加号。

§

Minus

减号。

§

Plaque

牌匾。

§

Wave

波浪。

§

Pie

饼图。

§

Bevel2

斜面 2。

§

FoldedCorner

折角。

§

Pentagon

五边形。

§

Chevron

人字形。

§

RightBracket

右方括号。

§

LeftBracket

左方括号。

§

DoubleBracket

双方括号。

§

StraightConnector1

直线连接器。

§

BentConnector2

折线连接器(2 段,无调整点)。

§

BentConnector3

折线连接器(3 段,1 个调整点)。

§

BentConnector4

折线连接器(4 段,2 个调整点)。

§

BentConnector5

折线连接器(5 段,3 个调整点)。

§

CurvedConnector2

曲线连接器(2 段,无调整点)。

§

CurvedConnector3

曲线连接器(3 段,1 个调整点)。

§

CurvedConnector4

曲线连接器(4 段,2 个调整点)。

§

CurvedConnector5

曲线连接器(5 段,3 个调整点)。

§

Other

任意未识别形状的兜底(实际写出 prst="rect")。

Implementations§

Source§

impl PresetGeometry

Source

pub fn as_str(self) -> &'static str

转 OOXML 字面量。

Trait Implementations§

Source§

impl Clone for PresetGeometry

Source§

fn clone(&self) -> PresetGeometry

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for PresetGeometry

Source§

impl Debug for PresetGeometry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Eq for PresetGeometry

Source§

impl FromStr for PresetGeometry

Source§

type Err = ()

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<PresetGeometry, <PresetGeometry as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Source§

impl PartialEq for PresetGeometry

Source§

fn eq(&self, other: &PresetGeometry) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for PresetGeometry

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V