[−][src]Struct wlroots::utils::region::PixmanRegion32
A thin wrapper around a 32 bit Pixman region.
Fields
region: pixman_region32_t
Methods
impl PixmanRegion32
[src]
impl PixmanRegion32
pub fn new() -> Self
[src]
pub fn new() -> Self
Construct a new Pixman region.
pub fn scale(&self, dest: &mut PixmanRegion32, scale: c_float)
[src]
pub fn scale(&self, dest: &mut PixmanRegion32, scale: c_float)
Scales a region, ie. multiplies all its coordinates by scale
and write out the result to dest
.
The resulting coordinates are rounded up or down so that the new region is at least as big as the original one.
pub fn transform(
&self,
dest: &mut PixmanRegion32,
transform: wl_output_transform,
width: c_int,
height: c_int
)
[src]
pub fn transform(
&self,
dest: &mut PixmanRegion32,
transform: wl_output_transform,
width: c_int,
height: c_int
)
Applies a transform to a region inside a box of size width
x height
.
Writes the result to dest
.
pub fn expand(&self, dest: &mut PixmanRegion32, distance: c_int)
[src]
pub fn expand(&self, dest: &mut PixmanRegion32, distance: c_int)
Expands the region of distance
. If distance
is negative, it shrinks the
region. Writes the result to the dest
.
pub fn rotated_bounds(
&self,
dest: &mut PixmanRegion32,
rotation: c_float,
ox: c_int,
oy: c_int
)
[src]
pub fn rotated_bounds(
&self,
dest: &mut PixmanRegion32,
rotation: c_float,
ox: c_int,
oy: c_int
)
Builds the smallest possible region that contains the region rotated
about the point in output space (ox, oy).
Writes the result to the dest
.
pub fn confine(
&mut self,
x1: c_double,
y1: c_double,
x2: c_double,
y2: c_double
) -> Result<(c_double, c_double), ()>
[src]
pub fn confine(
&mut self,
x1: c_double,
y1: c_double,
x2: c_double,
y2: c_double
) -> Result<(c_double, c_double), ()>
Confines a region to the box formed by the points.
If it could not be confined by the points it will return an error.
Auto Trait Implementations
impl !Send for PixmanRegion32
impl !Send for PixmanRegion32
impl !Sync for PixmanRegion32
impl !Sync for PixmanRegion32
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more