Rename GradientStops to Gradient and the legacy Gradient/Fill structs to LegacyGradient/LegacyFill

This commit is contained in:
Keavon Chambers
2026-07-20 15:27:21 -07:00
committed by Dennis Kobert
parent 21eae1e2a1
commit fd7f67b3e9
45 changed files with 296 additions and 300 deletions

View File

@@ -1,9 +1,9 @@
//! Not immediately shader compatible due to needing [`GradientStops`] as a param, which needs [`Vec`]
//! Not immediately shader compatible due to needing [`Gradient`] as a param, which needs [`Vec`]
use crate::adjust::Adjust;
use core_types::{Color, Ctx};
use raster_types::{CPU, Raster};
use vector_types::GradientStops;
use vector_types::Gradient;
// Aims for interoperable compatibility with:
// https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#:~:text=%27grdm%27%20%3D%20Gradient%20Map
@@ -14,10 +14,10 @@ fn gradient_map<T: Adjust<Color> + Clone + Send + Sync + core_types::CacheHash +
#[implementations(
Raster<CPU>,
Color,
GradientStops,
Gradient,
)]
mut image: T,
gradient: IList<GradientStops>,
gradient: IList<Gradient>,
reverse: bool,
) -> T {
if gradient.is_empty() {