mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-22 05:28:12 +08:00
Make the node graph use Table<GradientStops> instead of GradientStops (#3837)
* Switch from GradientStops to Table<GradientStops> in all nodes * Remove TaggedValue::ColorNotInTable * Fix bug Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Add migrations * Fix default gradient on empty table * Update demo artwork --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
gemini-code-assist[bot]
parent
81c73d11ff
commit
f1cbc4b396
@@ -3,7 +3,8 @@ use core_types::registry::types::TextArea;
|
||||
use core_types::table::Table;
|
||||
use core_types::{Context, Ctx};
|
||||
use glam::{DAffine2, DVec2};
|
||||
use graphic_types::{Artboard, Graphic, Vector, vector_types::GradientStops};
|
||||
use graphic_types::vector_types::GradientStops;
|
||||
use graphic_types::{Artboard, Graphic, Vector};
|
||||
use raster_types::{CPU, GPU, Raster};
|
||||
|
||||
/// Type-asserts a value to be a string.
|
||||
@@ -152,7 +153,7 @@ async fn switch<T, C: Send + 'n + Clone>(
|
||||
Context -> Table<Raster<CPU>>,
|
||||
Context -> Table<Raster<GPU>>,
|
||||
Context -> Table<Color>,
|
||||
Context -> GradientStops,
|
||||
Context -> Table<GradientStops>,
|
||||
)]
|
||||
if_true: impl Node<C, Output = T>,
|
||||
#[expose]
|
||||
@@ -171,7 +172,7 @@ async fn switch<T, C: Send + 'n + Clone>(
|
||||
Context -> Table<Raster<CPU>>,
|
||||
Context -> Table<Raster<GPU>>,
|
||||
Context -> Table<Color>,
|
||||
Context -> GradientStops,
|
||||
Context -> Table<GradientStops>,
|
||||
)]
|
||||
if_false: impl Node<C, Output = T>,
|
||||
) -> T {
|
||||
|
||||
Reference in New Issue
Block a user