Rename vector components to match new terminology (#719)

* Renamed VectorAnchor, VectorShape and VectorControlPoint. Also fixed other naming inconsistencies.

* Renamed messages relating to vector and updated naming in several tools

* Renamed comments + caught a few areas I had missed.

* Caught a few more incorrect names

* Code review pass

* Review changes

* Fixed warning

* Additional review feedback

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Oliver Davies
2022-07-12 17:59:06 -07:00
committed by Keavon Chambers
co-authored by Keavon Chambers
parent 5d1d93917d
commit 03633bf313
39 changed files with 1125 additions and 1095 deletions
+26 -25
View File
@@ -2,9 +2,9 @@ use crate::boolean_ops::BooleanOperation as BooleanOperationType;
use crate::layers::blend_mode::BlendMode;
use crate::layers::layer_info::Layer;
use crate::layers::style::{self, Stroke};
use crate::layers::vector::constants::ControlPointType;
use crate::layers::vector::vector_anchor::VectorAnchor;
use crate::layers::vector::vector_shape::VectorShape;
use crate::layers::vector::constants::ManipulatorType;
use crate::layers::vector::manipulator_group::ManipulatorGroup;
use crate::layers::vector::subpath::Subpath;
use crate::LayerId;
use serde::{Deserialize, Serialize};
@@ -89,7 +89,8 @@ pub enum Operation {
path: Vec<LayerId>,
transform: [f64; 6],
insert_index: isize,
vector_path: VectorShape,
// TODO This will become a compound path once we support them.
subpath: Subpath,
style: style::PathStyle,
},
BooleanOperation {
@@ -99,14 +100,14 @@ pub enum Operation {
DeleteLayer {
path: Vec<LayerId>,
},
DeleteSelectedVectorPoints {
DeleteSelectedManipulatorPoints {
layer_paths: Vec<Vec<LayerId>>,
},
DeselectVectorPoints {
DeselectManipulatorPoints {
layer_path: Vec<LayerId>,
point_ids: Vec<(u64, ControlPointType)>,
point_ids: Vec<(u64, ManipulatorType)>,
},
DeselectAllVectorPoints {
DeselectAllManipulatorPoints {
layer_path: Vec<LayerId>,
},
DuplicateLayer {
@@ -118,11 +119,17 @@ pub enum Operation {
font_style: String,
size: f64,
},
MoveSelectedVectorPoints {
MoveSelectedManipulatorPoints {
layer_path: Vec<LayerId>,
delta: (f64, f64),
absolute_position: (f64, f64),
},
MoveManipulatorPoint {
layer_path: Vec<LayerId>,
id: u64,
manipulator_type: ManipulatorType,
position: (f64, f64),
},
RenameLayer {
layer_path: Vec<LayerId>,
new_name: String,
@@ -147,38 +154,32 @@ pub enum Operation {
path: Vec<LayerId>,
transform: [f64; 6],
},
SelectVectorPoints {
SelectManipulatorPoints {
layer_path: Vec<LayerId>,
point_ids: Vec<(u64, ControlPointType)>,
point_ids: Vec<(u64, ManipulatorType)>,
add: bool,
},
SetShapePath {
path: Vec<LayerId>,
vector_path: VectorShape,
subpath: Subpath,
},
InsertVectorAnchor {
InsertManipulatorGroup {
layer_path: Vec<LayerId>,
anchor: VectorAnchor,
manipulator_group: ManipulatorGroup,
after_id: u64,
},
PushVectorAnchor {
PushManipulatorGroup {
layer_path: Vec<LayerId>,
anchor: VectorAnchor,
manipulator_group: ManipulatorGroup,
},
RemoveVectorAnchor {
RemoveManipulatorGroup {
layer_path: Vec<LayerId>,
id: u64,
},
MoveVectorPoint {
RemoveManipulatorPoint {
layer_path: Vec<LayerId>,
id: u64,
control_type: ControlPointType,
position: (f64, f64),
},
RemoveVectorPoint {
layer_path: Vec<LayerId>,
id: u64,
control_type: ControlPointType,
manipulator_type: ManipulatorType,
},
TransformLayerInScope {
path: Vec<LayerId>,