Struct skia_safe::RefHandle

source ·
#[repr(transparent)]
pub struct RefHandle<N: NativeDrop>(_);
Expand description

A wrapper type that represents a native type with a pointer to the native object.

Implementations§

source§

impl RefHandle<SkDrawable_GpuDrawHandler>

source

pub fn draw(&mut self, info: &BackendDrawableInfo)

source§

impl RefHandle<SkImageGenerator>

source

pub fn unique_id(&self) -> u32

source

pub fn encoded_data(&mut self) -> Option<Data>

source

pub fn info(&self) -> &ImageInfo

source

pub fn is_valid(&self, context: Option<&mut RecordingContext>) -> bool

source

pub fn get_pixels( &mut self, info: &ImageInfo, pixels: &mut [u8], row_bytes: usize ) -> bool

source

pub fn query_yuva_info( &self, supported_data_types: &SupportedDataTypes ) -> Option<YUVAPixmapInfo>

source

pub fn is_texture_generator(&self) -> bool

source

pub fn from_encoded(_encoded: impl Into<Data>) -> Option<Self>

👎Deprecated since 0.64.0: Removed, will return None. Use Image::deferred_from_encoded_data() or Codec::from_data()
source§

impl RefHandle<GrBackendTexture>

source

pub unsafe fn new_gl( (width, height): (i32, i32), mipmapped: Mipmapped, gl_info: TextureInfo ) -> Self

source

pub unsafe fn new_gl_with_label( (width, height): (i32, i32), mipmapped: Mipmapped, gl_info: TextureInfo, label: impl AsRef<str> ) -> Self

source

pub fn dimensions(&self) -> ISize

source

pub fn width(&self) -> i32

source

pub fn height(&self) -> i32

source

pub fn label(&self) -> &str

source

pub fn mipmapped(&self) -> Mipmapped

source

pub fn has_mip_maps(&self) -> bool

👎Deprecated since 0.35.0: Use has_mipmaps()
source

pub fn has_mipmaps(&self) -> bool

source

pub fn backend(&self) -> BackendAPI

source

pub fn gl_texture_info(&self) -> Option<TextureInfo>

source

pub fn gl_texture_parameters_modified(&mut self)

source

pub fn backend_format(&self) -> BackendFormat

source

pub fn set_mutable_state(&mut self, state: &MutableTextureState)

source

pub fn is_protected(&self) -> bool

source

pub fn is_valid(&self) -> bool

👎Deprecated since 0.37.0: Invalid BackendTextures aren’t supported
source

pub fn is_same_texture(&mut self, texture: &BackendTexture) -> bool

source§

impl RefHandle<Sk3DView>

source

pub fn new() -> Self

source

pub fn save(&mut self) -> &mut Self

source

pub fn restore(&mut self) -> &mut Self

source

pub fn translate(&mut self, d: impl Into<V3>) -> &mut Self

source

pub fn rotate_x(&mut self, deg: scalar) -> &mut Self

source

pub fn rotate_y(&mut self, deg: scalar) -> &mut Self

source

pub fn rotate_z(&mut self, deg: scalar) -> &mut Self

source

pub fn matrix(&self) -> Matrix

source

pub fn apply_to_canvas(&self, canvas: &mut Canvas) -> &Self

source

pub fn dot_with_normal(&self, d: impl Into<V3>) -> scalar

Trait Implementations§

source§

impl<N: NativeDrop> Drop for RefHandle<N>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<N: NativeDrop + NativePartialEq> PartialEq<RefHandle<N>> for RefHandle<N>

source§

fn eq(&self, rhs: &Self) -> 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<N> PointerWrapper<N> for RefHandle<N>where N: NativeDrop,

source§

fn wrap(ptr: *mut N) -> Option<Self>

Wraps a native pointer into a wrapper type. Returns None if the pointer is null.
source§

fn unwrap(self) -> *mut N

Unwraps the wrapper type into the native pointer.
source§

fn inner(&self) -> &N

Access the wrapped pointer.
source§

fn inner_mut(&mut self) -> &mut N

Access the wrapped pointer.

Auto Trait Implementations§

§

impl<N> RefUnwindSafe for RefHandle<N>where N: RefUnwindSafe,

§

impl<N> !Send for RefHandle<N>

§

impl<N> !Sync for RefHandle<N>

§

impl<N> Unpin for RefHandle<N>

§

impl<N> UnwindSafe for RefHandle<N>where N: RefUnwindSafe,

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<I> IntoIterator for Iwhere I: Iterator,

§

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
§

type IntoIter = I

Which kind of iterator are we turning this into?
const: unstable · source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
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, 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.