From 03633bf313026b68f1c36e60fa1e63d1cca8f287 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 12 Jul 2022 17:59:06 -0700 Subject: [PATCH] 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 --- bezier-rs/docs/interactive-docs/src/App.vue | 8 +- bezier-rs/lib/src/lib.rs | 4 +- deny.toml | 4 +- editor/src/consts.rs | 2 +- editor/src/dialog/dialogs/about_dialog.rs | 2 +- editor/src/dialog/dialogs/export_dialog.rs | 2 +- editor/src/document/document_message.rs | 6 +- .../src/document/document_message_handler.rs | 39 +- editor/src/document/transformation.rs | 2 +- editor/src/misc/build_metadata.rs | 6 +- editor/src/viewport_tools/snapping.rs | 18 +- .../src/viewport_tools/tools/gradient_tool.rs | 8 +- editor/src/viewport_tools/tools/path_tool.rs | 16 +- editor/src/viewport_tools/tools/pen_tool.rs | 99 ++-- .../tools/shared/path_outline.rs | 16 +- .../tools/shared/transformation_cage.rs | 6 +- editor/src/viewport_tools/tools/text_tool.rs | 2 +- .../src/viewport_tools/vector_editor/mod.rs | 6 +- .../vector_editor/overlay_renderer.rs | 156 +++-- .../vector_editor/shape_editor.rs | 166 +++--- graphene/src/boolean_ops.rs | 2 +- graphene/src/document.rs | 124 ++-- graphene/src/intersection.rs | 8 +- graphene/src/layers/id_vec.rs | 4 +- graphene/src/layers/layer_info.rs | 20 +- graphene/src/layers/shape_layer.rs | 38 +- graphene/src/layers/text_layer.rs | 23 +- graphene/src/layers/text_layer/to_path.rs | 36 +- graphene/src/layers/vector/constants.rs | 43 +- ...{vector_anchor.rs => manipulator_group.rs} | 181 +++--- ..._control_point.rs => manipulator_point.rs} | 36 +- graphene/src/layers/vector/mod.rs | 6 +- graphene/src/layers/vector/subpath.rs | 541 ++++++++++++++++++ graphene/src/layers/vector/vector_shape.rs | 529 ----------------- graphene/src/operation.rs | 51 +- proc-macros/src/helper_structs.rs | 4 +- proc-macros/src/helpers.rs | 2 +- proc-macros/src/lib.rs | 2 +- website/config.toml | 2 +- 39 files changed, 1125 insertions(+), 1095 deletions(-) rename graphene/src/layers/vector/{vector_anchor.rs => manipulator_group.rs} (51%) rename graphene/src/layers/vector/{vector_control_point.rs => manipulator_point.rs} (55%) create mode 100644 graphene/src/layers/vector/subpath.rs delete mode 100644 graphene/src/layers/vector/vector_shape.rs diff --git a/bezier-rs/docs/interactive-docs/src/App.vue b/bezier-rs/docs/interactive-docs/src/App.vue index 03e7b22e..307d1803 100644 --- a/bezier-rs/docs/interactive-docs/src/App.vue +++ b/bezier-rs/docs/interactive-docs/src/App.vue @@ -114,9 +114,9 @@ export default defineComponent({ name: "Lookup Table", callback: (canvas: HTMLCanvasElement, bezier: WasmBezierInstance, options: Record): void => { const lookupPoints = bezier.compute_lookup_table(options.steps); - lookupPoints.forEach((serialisedPoint, index) => { + lookupPoints.forEach((serializedPoint, index) => { if (index !== 0 && index !== lookupPoints.length - 1) { - drawPoint(getContextFromCanvas(canvas), JSON.parse(serialisedPoint), 3, COLORS.NON_INTERACTIVE.STROKE_1); + drawPoint(getContextFromCanvas(canvas), JSON.parse(serializedPoint), 3, COLORS.NON_INTERACTIVE.STROKE_1); } }); }, @@ -339,9 +339,7 @@ export default defineComponent({