Struct cairo::Region

source ·
#[repr(transparent)]
pub struct Region(_);

Implementations§

source§

impl Region

source

pub unsafe fn from_raw_none(ptr: *mut cairo_region_t) -> Region

source

pub unsafe fn from_raw_borrow(ptr: *mut cairo_region_t) -> Borrowed<Region>

source

pub unsafe fn from_raw_full(ptr: *mut cairo_region_t) -> Region

source

pub fn to_raw_none(&self) -> *mut cairo_region_t

source

pub fn create() -> Region

source

pub fn create_rectangle(rectangle: &RectangleInt) -> Region

source

pub fn create_rectangles(rectangles: &[RectangleInt]) -> Region

source

pub fn copy(&self) -> Region

source

pub fn extents(&self, rectangle: &mut RectangleInt)

source

pub fn num_rectangles(&self) -> i32

source

pub fn rectangle(&self, nth: i32) -> RectangleInt

source

pub fn is_empty(&self) -> bool

source

pub fn contains_point(&self, x: i32, y: i32) -> bool

source

pub fn contains_rectangle(&self, rectangle: &RectangleInt) -> RegionOverlap

source

pub fn translate(&self, dx: i32, dy: i32)

source

pub fn intersect(&self, other: &Region) -> Result<(), Error>

source

pub fn intersect_rectangle(&self, rectangle: &RectangleInt) -> Result<(), Error>

source

pub fn subtract(&self, other: &Region) -> Result<(), Error>

source

pub fn subtract_rectangle(&self, rectangle: &RectangleInt) -> Result<(), Error>

source

pub fn union(&self, other: &Region) -> Result<(), Error>

source

pub fn union_rectangle(&self, rectangle: &RectangleInt) -> Result<(), Error>

source

pub fn xor(&self, other: &Region) -> Result<(), Error>

source

pub fn xor_rectangle(&self, rectangle: &RectangleInt) -> Result<(), Error>

source

pub fn status(&self) -> Result<(), Error>

Trait Implementations§

source§

impl Clone for Region

source§

fn clone(&self) -> Region

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Region

source§

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

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

impl Display for Region

source§

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

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

impl Drop for Region

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<'a> FromValue<'a> for &'a Region

§

type Checker = GenericValueTypeOrNoneChecker<&'a Region>

Value type checker.
source§

unsafe fn from_value(value: &'a Value) -> Self

Get the contained value from a Value. Read more
source§

impl<'a> FromValue<'a> for Region

§

type Checker = GenericValueTypeOrNoneChecker<Region>

Value type checker.
source§

unsafe fn from_value(value: &'a Value) -> Self

Get the contained value from a Value. Read more
source§

impl PartialEq<Region> for Region

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StaticType for Region

source§

fn static_type() -> Type

Returns the type identifier of Self.
source§

impl ToValue for Region

source§

fn to_value(&self) -> Value

Convert a value to a Value.
source§

fn value_type(&self) -> Type

Returns the type identifer of self. Read more
source§

impl ToValueOptional for Region

source§

fn to_value_optional(s: Option<&Self>) -> Value

Convert an Option to a Value.
source§

impl ValueType for Region

§

type Type = Region

Type to get the Type from. Read more
source§

impl Eq for Region

source§

impl ValueTypeOptional for Region

Auto Trait Implementations§

§

impl RefUnwindSafe for Region

§

impl !Send for Region

§

impl !Sync for Region

§

impl Unpin for Region

§

impl UnwindSafe for Region

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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> StaticTypeExt for Twhere T: StaticType,

source§

fn ensure_type()

Ensures that the type has been registered with the type system.
source§

impl<T> ToClosureReturnValue for Twhere T: ToValue,

source§

impl<T> ToOwned for Twhere T: Clone,

§

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> ToString for Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

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> TryFromClosureReturnValue for Twhere T: for<'a> FromValue<'a> + StaticType + 'static,

source§

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

§

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<'a, T, C, E> FromValueOptional<'a> for Twhere T: FromValue<'a, Checker = C>, C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>, E: Error + Send + 'static,