pub enum ParticleImage {
SoftGlow(u32),
Circle(u32),
Star {
size: u32,
points: u32,
},
Spark(u32),
}Expand description
Pre-built particle images.
Variants§
SoftGlow(u32)
Radial gradient - white center fading to transparent.
Circle(u32)
Solid filled circle.
Star
Star shape with specified number of points.
Spark(u32)
Elongated spark/streak shape.
Implementations§
Source§impl ParticleImage
impl ParticleImage
Sourcepub fn star(size: u32, points: u32) -> Self
pub fn star(size: u32, points: u32) -> Self
Create a star particle image with the specified number of points.
Common values: 4, 5, 6, or 8 points.
Sourcepub fn spark(size: u32) -> Self
pub fn spark(size: u32) -> Self
Create an elongated spark/streak particle image.
Good for motion trails, fire sparks, or shooting stars.
Sourcepub fn to_cgimage(&self) -> CFRetained<CGImage> ⓘ
pub fn to_cgimage(&self) -> CFRetained<CGImage> ⓘ
Generate the CGImage for this particle.
Trait Implementations§
Source§impl Clone for ParticleImage
impl Clone for ParticleImage
Source§fn clone(&self) -> ParticleImage
fn clone(&self) -> ParticleImage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ParticleImage
impl RefUnwindSafe for ParticleImage
impl Send for ParticleImage
impl Sync for ParticleImage
impl Unpin for ParticleImage
impl UnwindSafe for ParticleImage
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
Mutably borrows from an owned value. Read more