[−][src]Struct blend2d::region::Region
Methods
impl Region
[src]
pub fn new() -> Self
[src]
pub fn region_type(&self) -> RegionType
[src]
pub fn is_empty(&self) -> bool
[src]
Returns true if this region is empty.
pub fn is_rect(&self) -> bool
[src]
Returns true if this region is a rectangle.
pub fn is_complex(&self) -> bool
[src]
Returns true if this region is of complex shape.
pub fn data(&self) -> &[BoxI]
[src]
The region's boxes.
pub fn len(&self) -> usize
[src]
The number of BoxI
this region contains.
pub fn capacity(&self) -> usize
[src]
Returns the currently allocated capacity of the region.
pub fn bounding_box(&self) -> &BoxI
[src]
A bounding box representing this region.
pub fn clear(&mut self)
[src]
Clears the region.
pub fn reserve(&mut self, n: usize)
[src]
pub fn try_reserve(&mut self, n: usize) -> Result<(), OutOfMemory>
[src]
Reserves capacity for at least n boxes.
pub fn shrink_to_fit(&mut self)
[src]
Shrinks the region's allocated capacity down to its current length.
pub fn combine(&mut self, other: &Self, op: BooleanOp)
[src]
pub fn combine_rb(&mut self, b: &BoxI, op: BooleanOp)
[src]
pub fn combine_br(&mut self, b: &BoxI, op: BooleanOp)
[src]
pub fn combine_bb(&mut self, b: &BoxI, b2: &BoxI, op: BooleanOp)
[src]
pub fn translate(&mut self, p: PointI)
[src]
Translates the region by the given PointI
.
Possible overflow will be handled by clipping to a maximum region
boundary, so the final region could be smaller than the region before
translation.
pub fn translate_and_clip(&mut self, p: PointI, clip: &BoxI)
[src]
Translates the region by the given PointI
and clips it to the given
[BoxI]
.
pub fn intersect_and_clip(&mut self, region: &Region, clip: &BoxI)
[src]
Translates the region by the given region and clips it to the given
[BoxI]
.
pub fn hit_test(&self, p: PointI) -> HitTest
[src]
Tests if a given PointI
is in the region.
pub fn hit_test_box(&self, b: &BoxI) -> HitTest
[src]
Tests if a given BoxI
is in the region.
Trait Implementations
impl DeepClone for Region
[src]
const ASSIGN_DEEP: unsafe extern "C" fn(_: *mut Self::Core, _: *const Self::Core) -> BLResult
[src]
fn clone_deep(&self) -> Self
[src]
Returns a deeply cloned copy of the value.
impl Geometry for Region
[src]
impl From<BoxI> for Region
[src]
impl<'a> From<&'a [BoxI]> for Region
[src]
impl From<RectI> for Region
[src]
impl<'a> From<&'a [RectI]> for Region
[src]
impl PartialEq<Region> for Region
[src]
fn eq(&self, other: &Self) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Clone for Region
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl AsRef<[BoxI]> for Region
[src]
impl Default for Region
[src]
impl Drop for Region
[src]
impl Debug for Region
[src]
impl Borrow<[BoxI]> for Region
[src]
Auto Trait Implementations
impl Unpin for Region
impl !Sync for Region
impl !Send for Region
impl RefUnwindSafe for Region
impl UnwindSafe for Region
Blanket Implementations
impl<T> ArrayType for T where
T: WrappedBlCore,
[src]
T: WrappedBlCore,
const IMPL_IDX: usize
[src]
unsafe fn push(&mut BLArrayCore, T)
[src]
unsafe fn insert(&mut BLArrayCore, usize, T)
[src]
unsafe fn replace(&mut BLArrayCore, usize, T)
[src]
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, V> SliceConcat<T> for V where
T: Clone,
V: Borrow<[T]>,
[src]
T: Clone,
V: Borrow<[T]>,
type Output = Vec<T>
slice_concat_trait
)The resulting type after concatenation
fn concat(slice: &[V]) -> Vec<T>
[src]
fn join(slice: &[V], sep: &T) -> Vec<T>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,