Type Alias rasterize::Scalar

source ·
pub type Scalar = f64;
Expand description

Scalar type

Trait Implementations§

source§

impl Color for Scalar

source§

fn to_rgba(self) -> [u8; 4]

Convert color to sRGBA list
source§

fn blend_over(self, other: Self) -> Self

Blend other color on top of this color
source§

fn with_alpha(self, alpha: Scalar) -> Self

Override alpha component of the color
source§

fn lerp(self, other: Self, t: f32) -> Self

Linear interpolation between self and other colors.
source§

fn to_rgb(self) -> [u8; 3]

Convert color to sRGB list (alpha is discarded)
source§

fn luma(self) -> f32

Calculate LUMA of the color.
source§

fn best_contrast(self, c0: Self, c1: Self) -> Self

Pick color that produces the best contrast with self
source§

impl Mul<&Point> for Scalar

§

type Output = Point

The resulting type after applying the * operator.
source§

fn mul(self, other: &Point) -> Self::Output

Performs the * operation. Read more
source§

impl Mul<Point> for Scalar

§

type Output = Point

The resulting type after applying the * operator.
source§

fn mul(self, other: Point) -> Self::Output

Performs the * operation. Read more