mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-19 10:58:04 +08:00
Rename gradient type to gradient form (#4405)
* Rename gradient type to gradient form * Update the demo art for the gradient form rename * Say form not type in the Gradient Form node's doc comment
This commit is contained in:
@@ -9,7 +9,7 @@ use rand::SeedableRng;
|
||||
use rand::seq::SliceRandom;
|
||||
use raster_types::{CPU, GPU, Raster};
|
||||
use std::cmp::Ordering;
|
||||
use vector_types::gradient::{GradientSpread, GradientType};
|
||||
use vector_types::gradient::{GradientForm, GradientSpread};
|
||||
use vector_types::{Gradient, ReferencePoint};
|
||||
|
||||
/// Returns the list with the item at the specified index removed.
|
||||
@@ -567,7 +567,7 @@ async fn write_attribute<T: AnyHash + Clone + Send + Sync + CacheHash>(
|
||||
List<Gradient>,
|
||||
List<Artboard>,
|
||||
List<BlendMode>,
|
||||
List<GradientType>,
|
||||
List<GradientForm>,
|
||||
List<GradientSpread>,
|
||||
)]
|
||||
content: List<T>,
|
||||
@@ -713,18 +713,18 @@ fn read_attribute_blend_mode(
|
||||
result
|
||||
}
|
||||
|
||||
/// Reads a named `GradientType` attribute from the input list, outputting each value as an element of a new `GradientType[]`.
|
||||
/// Reads a named `GradientForm` attribute from the input list, outputting each value as an element of a new `GradientForm[]`.
|
||||
#[node_macro::node(category("Attributes: Read"))]
|
||||
fn read_attribute_gradient_type(
|
||||
fn read_attribute_gradient_form(
|
||||
_: impl Ctx,
|
||||
content: ListDyn,
|
||||
/// The attribute name (key) to read.
|
||||
name: Item<String>,
|
||||
) -> List<GradientType> {
|
||||
) -> List<GradientForm> {
|
||||
let name = name.into_element();
|
||||
let mut result = List::with_capacity(content.len());
|
||||
for index in 0..content.len() {
|
||||
let Some(value) = content.attribute::<GradientType>(&name, index) else { continue };
|
||||
let Some(value) = content.attribute::<GradientForm>(&name, index) else { continue };
|
||||
result.push(Item::new_from_element(*value));
|
||||
}
|
||||
result
|
||||
|
||||
Reference in New Issue
Block a user