mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-20 03:18:06 +08:00
Rework Gradient into a newtype of List<Color> with optional position and midpoint attributes (#4397)
* Rework Gradient into a newtype of List<Color> with optional position and midpoint attributes * Fix Vello stopless-gradient fallback coverage, empty legacy gradient tables, the node docs gradient swatch, NaN position elision, and wired setter input overwrites
This commit is contained in:
committed by
Dennis Kobert
parent
b78e4b107e
commit
86d4106592
@@ -267,6 +267,16 @@ pub enum ParsedFieldType {
|
||||
Node(NodeParsedField),
|
||||
}
|
||||
|
||||
impl ParsedFieldType {
|
||||
/// The shared value-field data, present for every value field but not a lazy `Node`.
|
||||
pub fn regular(&self) -> Option<&RegularParsedField> {
|
||||
match self {
|
||||
ParsedFieldType::Regular(field) => Some(field),
|
||||
ParsedFieldType::Node(_) => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A single numeric endpoint within a `#[soft(..)]` or `#[hard(..)]` bounds range.
|
||||
/// Accepts both integer literals (e.g. `1`, `-1`) and float literals (e.g. `1.`, `-500.`).
|
||||
#[derive(Clone, Debug)]
|
||||
|
||||
Reference in New Issue
Block a user