Skip to main content

IvgLayers

Struct IvgLayers 

Source
pub struct IvgLayers { /* private fields */ }
Expand description

CorelDRAW IVGLayers 对象的后期绑定包装(图层集)。

所有属性与方法通过 IDispatch::Invoke 按名称调用,调用失败时一般返回 None 或 false。

Implementations§

Source§

impl IvgLayers

Source

pub fn new(disp: IDispatch) -> Self

由 COM IDispatch 构造包装对象。

Source

pub fn from_disp(disp: IDispatch) -> Self

从 COM IDispatch 构造包装对象,等价于 new。

Source

pub fn as_variant(&self) -> Variant

把底层 COM 对象包装成 VARIANT,用于传给其它 COM 调用。

Source

pub fn raw(&self) -> &ComObject

获取底层 ComObject 的引用。

Source

pub fn count(&self) -> Option<i64>

读取返回条目数量(Count)。

Source

pub fn application(&self) -> Option<IvgApplication>

读取应用(Application)。

Source

pub fn item(&self, index_or_name: Variant) -> Option<IvgLayer>

通过索引"-based)或名称访问。

Source

pub fn item_by_index(&self, i: i32) -> Option<IvgLayer>

读取条目索引(Item)。

Source

pub fn item_by_name(&self, name: impl Into<String>) -> Option<IvgLayer>

读取条目名称(Item)。

Source

pub fn find(&self, layer_name: impl Into<String>) -> Option<IvgLayer>

直接按名称查找(与 item_by_name 等效,但走 COM 的 Find)。

Source

pub fn top(&self) -> Option<IvgLayer>

最顶层图层。

Source

pub fn bottom(&self) -> Option<IvgLayer>

最底层图层。

Source

pub fn all(&self) -> Vec<IvgLayer>

返回所有图层(按索引 1..Count 顺序)。

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<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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.