pub struct FocalData {
pub fr1: f32,
pub f_focal_x: f32,
pub f_is_swapped: bool,
}
Expand description
Focal data for a radial gradient.
Fields§
§fr1: f32
The normalized radius of the outer circle in focal space.
f_focal_x: f32
The x-coordinate of the focal point in normalized space [0,1].
f_is_swapped: bool
Whether the focal points have been swapped.
Implementations§
Source§impl FocalData
impl FocalData
Sourcepub fn create(r0: f32, r1: f32, matrix: &mut Affine) -> Self
pub fn create(r0: f32, r1: f32, matrix: &mut Affine) -> Self
Create a new FocalData
with the given radii and update the matrix.
Sourcepub fn is_focal_on_circle(&self) -> bool
pub fn is_focal_on_circle(&self) -> bool
Whether the focal is on the circle.
Sourcepub fn is_swapped(&self) -> bool
pub fn is_swapped(&self) -> bool
Whether the focal points have been swapped.
Sourcepub fn is_well_behaved(&self) -> bool
pub fn is_well_behaved(&self) -> bool
Whether the gradient is well-behaved.
Sourcepub fn is_natively_focal(&self) -> bool
pub fn is_natively_focal(&self) -> bool
Whether the gradient is natively focal.
Trait Implementations§
impl Copy for FocalData
impl StructuralPartialEq for FocalData
Auto Trait Implementations§
impl Freeze for FocalData
impl RefUnwindSafe for FocalData
impl Send for FocalData
impl Sync for FocalData
impl Unpin for FocalData
impl UnwindSafe for FocalData
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