Skip to main content

LineFormat

Struct LineFormat 

Source
pub struct LineFormat<'a> { /* private fields */ }
Expand description

线框高阶视图(pptx.dml.line.LineFormat)。

§与 python-pptx 的对应

Implementations§

Source§

impl<'a> LineFormat<'a>

Source

pub fn new(line: &'a mut Line) -> LineFormat<'a>

构造一个 line 视图。

Source

pub fn line(&self) -> &Line

底层 line 不可变引用。

Source

pub fn line_mut(&mut self) -> &mut Line

底层 line 可变引用。

Source

pub fn color(&mut self) -> ColorFormat<'_>

颜色 ColorFormat 代理。

Source

pub fn width(&self) -> Option<Emu>

读取宽度(EMU)。

Source

pub fn set_width(&mut self, w: Emu)

设置宽度(EMU)。通常 Pt(1.0).emu() 即可。

Source

pub fn dash_style(&self) -> Option<Dash>

读取线型。

Source

pub fn set_dash_style(&mut self, s: MsoLineDashStyle)

设置线型(用 super::simpletypes::MsoLineDashStyle,自动转 Dash)。

Source

pub fn set_no_fill(&mut self)

设为无填充(透明线框)。

Source

pub fn set_width_pt(&mut self, pt: Pt)

便捷:设宽度为磅值。

Trait Implementations§

Source§

impl<'a> Debug for LineFormat<'a>

Source§

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

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

impl<'a> From<&'a mut Line> for LineFormat<'a>

Source§

fn from(l: &'a mut Line) -> LineFormat<'a>

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<'a> !UnwindSafe for LineFormat<'a>

§

impl<'a> Freeze for LineFormat<'a>

§

impl<'a> RefUnwindSafe for LineFormat<'a>

§

impl<'a> Send for LineFormat<'a>

§

impl<'a> Sync for LineFormat<'a>

§

impl<'a> Unpin for LineFormat<'a>

§

impl<'a> UnsafeUnpin for LineFormat<'a>

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