pub struct Context { /* private fields */ }Expand description
WGPU context for applying various effects
Implementations§
Source§impl Context
impl Context
Sourcepub fn submit_merge(
&self,
image: &FlexBuffer<PixelBufferTag>,
remove_nans: bool,
buf: &mut MergeWorkspace,
) -> Result<(), MergeError>
pub fn submit_merge( &self, image: &FlexBuffer<PixelBufferTag>, remove_nans: bool, buf: &mut MergeWorkspace, ) -> Result<(), MergeError>
Submits a set of merge operations to accumulate a single image
MergeWorkspace::reset should be called before the first call to
submit_merge. For the first merge after a reset, the output buffer is
resized to fit the images; subsequent merges must be of the same size.
Sourcepub fn merge_workspace(&self) -> MergeWorkspace
pub fn merge_workspace(&self) -> MergeWorkspace
Builds a new set of MergeWorkspace for the given image size
Sourcepub fn submit_color(
&self,
merge: &mut MergeWorkspace,
settings: ColorSettings,
shape: &ShapeColorBuffers,
bufs: &mut ColorWorkspace,
) -> Result<(), ColorError>
pub fn submit_color( &self, merge: &mut MergeWorkspace, settings: ColorSettings, shape: &ShapeColorBuffers, bufs: &mut ColorWorkspace, ) -> Result<(), ColorError>
Submits a color evaluation pass
Image size is set from the MergeWorkspace; the transform matrix is
provided separately (but should be the same one used for image
evaluation).
Sourcepub fn submit_color_with_vars(
&self,
merge: &mut MergeWorkspace,
settings: ColorSettings,
shape: &ShapeColorBuffers,
bufs: &mut ColorWorkspace,
vars: &ShapeVars<f32>,
) -> Result<(), ColorError>
pub fn submit_color_with_vars( &self, merge: &mut MergeWorkspace, settings: ColorSettings, shape: &ShapeColorBuffers, bufs: &mut ColorWorkspace, vars: &ShapeVars<f32>, ) -> Result<(), ColorError>
Submits a color evaluation pass with auxiliary variables
Image size is set from the MergeWorkspace; the transform matrix is
provided separately (but should be the same one used for image
evaluation).
Sourcepub fn color_workspace(&self) -> ColorWorkspace
pub fn color_workspace(&self) -> ColorWorkspace
Returns a new workspace for color evaluation
Auto Trait Implementations§
impl !Freeze for Context
impl !RefUnwindSafe for Context
impl !Send for Context
impl !Sync for Context
impl !UnwindSafe for Context
impl Unpin for Context
impl UnsafeUnpin for Context
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.