mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-17 23:38:06 +08:00
Split Fill's optional transform into a has-transform toggle and add the DashPattern and BoxCorners value types
This commit is contained in:
committed by
Dennis Kobert
parent
6acc0638e4
commit
7ddab438d1
@@ -16,7 +16,10 @@ use dyn_any::DynAny;
|
||||
pub use dyn_any::StaticType;
|
||||
pub use glam::{DAffine2, DVec2, IVec2, UVec2};
|
||||
use graphene_application_io::resource::ResourceHash;
|
||||
use graphene_application_io::resource::ResourceId;
|
||||
use graphic_types::raster_types::{CPU, Image, Raster};
|
||||
use graphic_types::vector_types::vector::misc::BoxCorners;
|
||||
use graphic_types::vector_types::vector::style::DashPattern;
|
||||
use graphic_types::vector_types::vector::style::Gradient;
|
||||
use graphic_types::vector_types::vector::{self, ReferencePoint};
|
||||
use graphic_types::{Artboard, Graphic, Vector};
|
||||
@@ -533,19 +536,21 @@ tagged_value! {
|
||||
DVec2(DVec2),
|
||||
#[serde(alias = "Affine2")]
|
||||
DAffine2(DAffine2),
|
||||
OptionalDAffine2(Option<DAffine2>),
|
||||
#[serde(alias = "FillGradient")]
|
||||
LegacyGradient(graphic_types::migrations::legacy::LegacyGradient),
|
||||
Font(Font),
|
||||
Footprint(Footprint),
|
||||
VectorModification(Box<VectorModification>),
|
||||
ImageData(Image<Color>),
|
||||
Resource(graphene_application_io::resource::ResourceId),
|
||||
Resource(ResourceId),
|
||||
// Legacy
|
||||
#[serde(alias = "OptionalDAffine2")]
|
||||
LegacyOptionalDAffine2(Option<DAffine2>),
|
||||
#[serde(alias = "FillGradient")]
|
||||
LegacyGradient(graphic_types::migrations::legacy::LegacyGradient),
|
||||
#[serde(alias = "Fill")]
|
||||
LegacyFill(graphic_types::migrations::legacy::LegacyFill),
|
||||
// ==========
|
||||
// ENUM TYPES
|
||||
// ==========
|
||||
#[serde(alias = "Fill")]
|
||||
LegacyFill(graphic_types::migrations::legacy::LegacyFill),
|
||||
BlendMode(core_types::blending::BlendMode),
|
||||
LuminanceCalculation(raster_nodes::adjustments::LuminanceCalculation),
|
||||
QRCodeErrorCorrectionLevel(vector_nodes::generator_nodes::QRCodeErrorCorrectionLevel),
|
||||
@@ -575,6 +580,8 @@ tagged_value! {
|
||||
StrokeJoin(vector::style::StrokeJoin),
|
||||
StrokeAlign(vector::style::StrokeAlign),
|
||||
PaintOrder(vector::style::PaintOrder),
|
||||
DashPattern(vector::style::DashPattern),
|
||||
BoxCorners(vector::misc::BoxCorners),
|
||||
GradientType(vector::style::GradientType),
|
||||
GradientSpreadMethod(vector::style::GradientSpreadMethod),
|
||||
ReferencePoint(vector::ReferencePoint),
|
||||
@@ -723,6 +730,8 @@ impl TaggedValue {
|
||||
() if ty == TypeId::of::<List<Graphic>>() => to_color(string).map(TaggedValue::Color)?,
|
||||
() if ty == TypeId::of::<List<Gradient>>() => to_gradient(string).map(TaggedValue::Gradient)?,
|
||||
() if ty == TypeId::of::<ReferencePoint>() => to_reference_point(string).map(TaggedValue::ReferencePoint)?,
|
||||
() if ty == TypeId::of::<DashPattern>() => TaggedValue::DashPattern(DashPattern::from(string)),
|
||||
() if ty == TypeId::of::<BoxCorners>() => TaggedValue::BoxCorners(BoxCorners::from(string)),
|
||||
_ => return None,
|
||||
};
|
||||
Some(ty)
|
||||
|
||||
Reference in New Issue
Block a user