Struct pixman::Solid

source ·
pub struct Solid<'alpha> { /* private fields */ }
Expand description

Solid color image

Implementations§

source§

impl<'a> Solid<'a>

source

pub fn set_alpha_map<'alpha: 'a>( self, alpha_map: &'alpha Image<'_, 'static>, x: i16, y: i16 ) -> Solid<'alpha>

Set an alpha map that will be used when this image is used as a src in a blit operation

source

pub fn clear_alpha_map(self) -> Solid<'static>

Clear a previously set alpha map

source§

impl<'alpha> Solid<'alpha>

source

pub unsafe fn from_ptr(ptr: *mut pixman_image_t) -> Self

Initialize the image from a raw pointer

Safety

The pointer is expected to be valid and have a ref-count of at least one. Ownership of the pointer is transferred and unref will be called on drop.

source§

impl Solid<'static>

source

pub fn new(color: impl Into<Color>) -> Result<Self, CreateFailed>

Create a new solid color image usable as the src in blit operations

Methods from Deref<Target = ImageRef>§

source

pub fn set_repeat(&self, repeat: Repeat)

Set the repeat operation for this image

source

pub fn set_transform( &self, transform: impl Into<Transform> ) -> Result<(), OperationFailed>

Apply the specified transform during sampling from this image

source

pub fn clear_transform(&self) -> Result<(), OperationFailed>

Clear a previously applied transform

source

pub fn set_clip_region( &self, region: Option<&Region16> ) -> Result<(), OperationFailed>

Apply a clip region used during composition

source

pub fn set_clip_region32( &self, region: Option<&Region32> ) -> Result<(), OperationFailed>

Apply a clip region used during composition

source

pub fn set_dither(&self, dither: Dither)

Set the dither operation used during composition

source

pub fn set_dither_offset(&self, offset_x: c_int, offset_y: c_int)

Set the dither offset

source

pub fn set_filter( &self, filter: Filter, filter_params: &[Fixed] ) -> Result<(), OperationFailed>

Set the filter operation used during composition

source

pub fn set_has_client_clip(&self, client_clip: bool)

Set whether the source clip was set by a client

source

pub fn set_source_clipping(&self, source_clipping: bool)

Set whether the clip applies when the image is used as a source

source

pub fn component_alpha(&self) -> bool

Whether the image has component alpha or unified alpha

source

pub fn set_component_alpha(&self, component_alpha: bool)

Set whether the image has component alpha or unified alpha

source

pub fn as_ptr(&self) -> *mut pixman_image_t

Access the raw image pointer

Trait Implementations§

source§

impl<'alpha> Debug for Solid<'alpha>

source§

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

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

impl<'alpha> Deref for Solid<'alpha>

§

type Target = ImageRef

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

§

impl<'alpha> RefUnwindSafe for Solid<'alpha>

§

impl<'alpha> !Send for Solid<'alpha>

§

impl<'alpha> !Sync for Solid<'alpha>

§

impl<'alpha> Unpin for Solid<'alpha>

§

impl<'alpha> UnwindSafe for Solid<'alpha>

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, 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, 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.