mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 02:58:12 +08:00
Rename GraphicElement -> Graphic and trait GraphicElementRendered -> Render (#2987)
This commit is contained in:
@@ -17,7 +17,7 @@ use graphene_std::text::{Font, TypesettingConfig};
|
||||
use graphene_std::vector::VectorData;
|
||||
use graphene_std::vector::style::{Fill, Stroke};
|
||||
use graphene_std::vector::{PointId, VectorModificationType};
|
||||
use graphene_std::{GraphicElement, NodeInputDecleration};
|
||||
use graphene_std::{Graphic, NodeInputDecleration};
|
||||
|
||||
#[derive(PartialEq, Clone, Copy, Debug, serde::Serialize, serde::Deserialize)]
|
||||
pub enum TransformIn {
|
||||
@@ -303,7 +303,7 @@ impl<'a> ModifyInputsContext<'a> {
|
||||
// TODO: Allow the path node to operate on Graphic Group data by utilizing the reference for each vector data in a group.
|
||||
if node_definition.identifier == "Path" {
|
||||
let layer_input_type = self.network_interface.input_type(&InputConnector::node(output_layer.to_node(), 1), &[]).0.nested_type().clone();
|
||||
if layer_input_type == concrete!(Table<GraphicElement>) {
|
||||
if layer_input_type == concrete!(Table<Graphic>) {
|
||||
let Some(flatten_path_definition) = resolve_document_node_type("Flatten Path") else {
|
||||
log::error!("Flatten Path does not exist in ModifyInputsContext::existing_node_id");
|
||||
return None;
|
||||
|
||||
@@ -26,7 +26,7 @@ use graphene_std::transform::{Footprint, ReferencePoint, Transform};
|
||||
use graphene_std::vector::VectorData;
|
||||
use graphene_std::vector::misc::{ArcType, CentroidType, GridType, MergeByDistanceAlgorithm, PointSpacingType};
|
||||
use graphene_std::vector::style::{Fill, FillChoice, FillType, GradientStops, GradientType, PaintOrder, StrokeAlign, StrokeCap, StrokeJoin};
|
||||
use graphene_std::{GraphicElement, NodeInputDecleration};
|
||||
use graphene_std::{Graphic, NodeInputDecleration};
|
||||
|
||||
pub(crate) fn string_properties(text: &str) -> Vec<LayoutGroup> {
|
||||
let widget = TextLabel::new(text).widget_holder();
|
||||
@@ -185,7 +185,7 @@ pub(crate) fn property_from_type(
|
||||
// ====================
|
||||
Some(x) if x == TypeId::of::<Table<VectorData>>() => vector_data_widget(default_info).into(),
|
||||
Some(x) if x == TypeId::of::<Table<Raster<CPU>>>() || x == TypeId::of::<Table<Raster<GPU>>>() => raster_widget(default_info).into(),
|
||||
Some(x) if x == TypeId::of::<Table<GraphicElement>>() => group_widget(default_info).into(),
|
||||
Some(x) if x == TypeId::of::<Table<Graphic>>() => group_widget(default_info).into(),
|
||||
// ============
|
||||
// STRUCT TYPES
|
||||
// ============
|
||||
|
||||
@@ -6611,7 +6611,7 @@ struct InputTransientMetadata {
|
||||
fn migrate_output_names<'de, D: serde::Deserializer<'de>>(deserializer: D) -> Result<Vec<String>, D::Error> {
|
||||
use serde::Deserialize;
|
||||
|
||||
const REPLACEMENTS: [(&str, &str); 12] = [
|
||||
const REPLACEMENTS: &[(&str, &str)] = &[
|
||||
// Single to table data
|
||||
("VectorData", "Table<VectorData>"),
|
||||
("GraphicGroup", "Table<GraphicGroup>"),
|
||||
@@ -6622,11 +6622,13 @@ fn migrate_output_names<'de, D: serde::Deserializer<'de>>(deserializer: D) -> Re
|
||||
("Instances<VectorData>", "Table<VectorData>"),
|
||||
("Instances<GraphicGroup>", "Table<GraphicGroup>"),
|
||||
("Instances<Image>", "Table<Image>"),
|
||||
("Instances<GraphicElement>", "Table<GraphicElement>"),
|
||||
("Instances<GraphicElement>", "Table<Graphic>"),
|
||||
("Table<GraphicElement>", "Table<Graphic>"),
|
||||
("Future<Instances<VectorData>>", "Future<Table<VectorData>>"),
|
||||
("Future<Instances<GraphicGroup>>", "Future<Table<GraphicGroup>>"),
|
||||
("Future<Instances<Image>>", "Future<Table<Image>>"),
|
||||
("Future<Instances<GraphicElement>>", "Future<Table<GraphicElement>>"),
|
||||
("Future<Instances<GraphicElement>>", "Future<Table<Graphic>>"),
|
||||
("Future<Table<GraphicElement>>", "Future<Table<Graphic>>"),
|
||||
];
|
||||
|
||||
let mut names = Vec::<String>::deserialize(deserializer)?;
|
||||
|
||||
Reference in New Issue
Block a user