Skip to main content

RunProperties

Struct RunProperties 

Source
pub struct RunProperties {
Show 19 fields pub size: Option<Pt>, pub bold: bool, pub italic: bool, pub underline: Option<Underline>, pub strike: bool, pub strike_dbl: bool, pub color: Color, pub highlight: Option<Color>, pub latin_font: Option<String>, pub eastasia_font: Option<String>, pub cs_font: Option<String>, pub baseline: Option<i32>, pub kerning: Option<i32>, pub spc: Option<i32>, pub caps: Caps, pub lang: Option<String>, pub alpha: Option<i32>, pub hlink_click: Option<Hyperlink>, pub hlink_hover: Option<Hyperlink>,
}
Expand description

Run 属性 <a:rPr>

Fields§

§size: Option<Pt>

字号(Pt)。None 表示走主题继承。

§bold: bool

是否加粗。

§italic: bool

是否斜体。

§underline: Option<Underline>

下划线样式。None 表示不下划线。

§strike: bool

单删除线。

§strike_dbl: bool

双删除线。

§color: Color

文本颜色。Color::None 表示走主题继承。

§highlight: Option<Color>

高亮背景色。None 表示不高亮。

§latin_font: Option<String>

字体名(拉丁)。

§eastasia_font: Option<String>

东亚字体。

§cs_font: Option<String>

复杂脚本字体。

§baseline: Option<i32>

baseline 偏移(百分比,正=上标,负=下标)。

§kerning: Option<i32>

字距(百分之一磅)。

§spc: Option<i32>

字符间距。

§caps: Caps

大写(small caps / all caps)。

§lang: Option<String>

lang:英文/中文/…语言。

§alpha: Option<i32>

透明度(0-100000,0=不透明,100000=完全透明)。

对标 DrawingML <a:solidFill><a:srgbClr val="..."><a:alpha val="30000"/></a:srgbClr></a:solidFill>。 常用值:30_000 = 30% 不透明(70% 透明),用于水印等场景。

§hlink_click: Option<Hyperlink>

点击超链接(<a:hlinkClick>)。

§hlink_hover: Option<Hyperlink>

悬停超链接(<a:hlinkHover>)。

Implementations§

Source§

impl RunProperties

Source

pub fn write_xml(&self, w: &mut XmlWriter, tag: &str)

写 XML。

Source

pub fn copy(&self) -> RunProperties

克隆出 RunProperties(含同名字段)。

Trait Implementations§

Source§

impl Clone for RunProperties

Source§

fn clone(&self) -> RunProperties

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 Debug for RunProperties

Source§

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

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

impl Default for RunProperties

Source§

fn default() -> RunProperties

Returns the “default value” for a type. Read more
Source§

impl<'a> From<&'a mut RunProperties> for Font<'a>

Source§

fn from(r: &'a mut RunProperties) -> Font<'a>

Converts to this type from the input type.

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<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