Skip to main content

IvgRect

Struct IvgRect 

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

CorelDRAW IVGRect 对象的后期绑定包装(矩形)。

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

Implementations§

Source§

impl IvgRect

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 x(&self) -> Option<f64>

读取 X 坐标(x)。

Source

pub fn set_x(&self, v: f64) -> bool

设置 X 坐标(x)。

Source

pub fn y(&self) -> Option<f64>

读取 Y 坐标(y)。

Source

pub fn set_y(&self, v: f64) -> bool

设置 Y 坐标(y)。

Source

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

读取宽度(Width)。

Source

pub fn set_width(&self, v: f64) -> bool

设置宽度(Width)。

Source

pub fn height(&self) -> Option<f64>

读取高度(Height)。

Source

pub fn set_height(&self, v: f64) -> bool

设置高度(Height)。

Source

pub fn left(&self) -> Option<f64>

读取左(Left)。

Source

pub fn right(&self) -> Option<f64>

读取右(Right)。

Source

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

读取顶(Top)。

Source

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

读取底(Bottom)。

Source

pub fn center_x(&self) -> Option<f64>

读取中心 X 坐标(CenterX)。

Source

pub fn center_y(&self) -> Option<f64>

读取中心 Y 坐标(CenterY)。

Source

pub fn is_empty(&self) -> Option<bool>

是否空(IsEmpty)。

Source

pub fn set_rect(&self, x: f64, y: f64, w: f64, h: f64) -> bool

设置矩形(SetRect)。

Source

pub fn get_rect(&self) -> Option<(f64, f64, f64, f64)>

读取矩形。

Source

pub fn clear(&self) -> bool

清空全部内容(COM 方法 Clear)。

Source

pub fn copy_assign(&self, src: &IvgRect) -> bool

复制 assign(COM 方法 CopyAssign)。

Source

pub fn get_copy(&self) -> Option<IvgRect>

读取复制(GetCopy)。

Source

pub fn intersect(&self, other: &IvgRect) -> Option<IvgRect>

intersect(COM 方法 Intersect)。

Source

pub fn union(&self, other: &IvgRect) -> Option<IvgRect>

调用 COM 方法 Union。

Source

pub fn offset(&self, dx: f64, dy: f64) -> bool

偏移(COM 方法 Offset)。

Source

pub fn inflate(&self, l: f64, t: f64, r: f64, b: f64) -> Option<bool>

膨胀(COM 方法 Inflate)。

Source

pub fn is_point_inside(&self, x: f64, y: f64) -> Option<bool>

是否点内部(COM 方法 IsPointInside)。

Source

pub fn change_context( &self, src_doc: &IvgDocument, dst_doc: &IvgDocument, ) -> Option<IvgRect>

更改上下文(COM 方法 ChangeContext)。

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.