Skip to content

Commit b26885c

Browse files
Merge branch 'master' into add-arrow-shape-feature-cleaned
2 parents fb3fd22 + 1b91198 commit b26885c

21 files changed

Lines changed: 135 additions & 72 deletions

File tree

.branding

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
https://github.com/Keavon/graphite-branded-assets/archive/f8b02e68c92f5bbd27626bdd7a51102303b70a40.tar.gz
2-
d06fd7b79fa9b7509c23072fa56745415fdc6eb98575d15214b0acc47ea4dd42
1+
https://github.com/Keavon/graphite-branded-assets/archive/8cd7cf811d36228a2eb7ce741adc3c745632a6e7.tar.gz
2+
17a7cd32dda4afd893c65e1fb6757f1ecf760702217f647d1c680db8d92643ef

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!--
22
Graphite has ZERO-TOLERANCE for contributing undisclosed AI-generated content.
33
If your PR involves AI, you must read our AI contribution policy (it's short):
4-
https://graphite.art/volunteer/guide/guide/starting-a-task/ai-contribution-policy
4+
https://graphite.art/volunteer/guide/starting-a-task/ai-contribution-policy
55
66
REMEMBER:
77
- You are responsible for thoroughly testing the successful implementation of your changes and ensuring no obvious regressions occur.

desktop/platform/win/build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ fn main() {
2323
res.set("FileDescription", "Graphite");
2424
res.set("ProductName", "Graphite");
2525

26-
res.set("LegalCopyright", "Copyright © 2025 Graphite Labs, LLC");
26+
// TODO: Pull this year from the Git commit date
27+
res.set("LegalCopyright", "Copyright © 2026 Graphite Labs, LLC");
2728
res.set("CompanyName", "Graphite Labs, LLC");
2829

2930
res.compile().expect("Failed to compile Windows resources");

editor/src/messages/portfolio/document/overlays/utility_functions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ pub fn path_endpoint_overlays(document: &DocumentMessageHandler, shape_editor: &
210210
let selected = shape_editor.selected_shape_state.get(&layer);
211211
let is_selected = |selected: Option<&SelectedLayerState>, point: ManipulatorPointId| selected.is_some_and(|selected| selected.is_point_selected(point));
212212

213-
for point in vector.anchor_points() {
213+
for point in vector.anchor_endpoints() {
214214
let Some(position) = vector.point_domain.position_from_id(point) else { continue };
215215
let position = transform.transform_point2(position);
216216
overlay_context.manipulator_anchor(position, is_selected(selected, ManipulatorPointId::Anchor(point)), None);

editor/src/messages/portfolio/document/utility_types/network_interface.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,12 +1844,12 @@ impl NodeNetworkInterface {
18441844

18451845
if *import_index == 0 {
18461846
let remove_import_center = reorder_import_center + DVec2::new(-4., 0.);
1847-
let remove_import = ClickTarget::new_with_subpath(Subpath::new_rect(remove_import_center - DVec2::new(8., 8.), remove_import_center + DVec2::new(8., 8.)), 0.);
1847+
let remove_import = ClickTarget::new_with_subpath(Subpath::new_rectangle(remove_import_center - DVec2::new(8., 8.), remove_import_center + DVec2::new(8., 8.)), 0.);
18481848
remove_imports_exports.insert_custom_output_port(*import_index, remove_import);
18491849
} else {
18501850
let remove_import_center = reorder_import_center + DVec2::new(-12., 0.);
1851-
let reorder_import = ClickTarget::new_with_subpath(Subpath::new_rect(reorder_import_center - DVec2::new(3., 4.), reorder_import_center + DVec2::new(3., 4.)), 0.);
1852-
let remove_import = ClickTarget::new_with_subpath(Subpath::new_rect(remove_import_center - DVec2::new(8., 8.), remove_import_center + DVec2::new(8., 8.)), 0.);
1851+
let reorder_import = ClickTarget::new_with_subpath(Subpath::new_rectangle(reorder_import_center - DVec2::new(3., 4.), reorder_import_center + DVec2::new(3., 4.)), 0.);
1852+
let remove_import = ClickTarget::new_with_subpath(Subpath::new_rectangle(remove_import_center - DVec2::new(8., 8.), remove_import_center + DVec2::new(8., 8.)), 0.);
18531853
reorder_imports_exports.insert_custom_output_port(*import_index, reorder_import);
18541854
remove_imports_exports.insert_custom_output_port(*import_index, remove_import);
18551855
}
@@ -1864,12 +1864,12 @@ impl NodeNetworkInterface {
18641864

18651865
if *export_index == 0 {
18661866
let remove_export_center = reorder_export_center + DVec2::new(4., 0.);
1867-
let remove_export = ClickTarget::new_with_subpath(Subpath::new_rect(remove_export_center - DVec2::new(8., 8.), remove_export_center + DVec2::new(8., 8.)), 0.);
1867+
let remove_export = ClickTarget::new_with_subpath(Subpath::new_rectangle(remove_export_center - DVec2::new(8., 8.), remove_export_center + DVec2::new(8., 8.)), 0.);
18681868
remove_imports_exports.insert_custom_input_port(*export_index, remove_export);
18691869
} else {
18701870
let remove_export_center = reorder_export_center + DVec2::new(12., 0.);
1871-
let reorder_export = ClickTarget::new_with_subpath(Subpath::new_rect(reorder_export_center - DVec2::new(3., 4.), reorder_export_center + DVec2::new(3., 4.)), 0.);
1872-
let remove_export = ClickTarget::new_with_subpath(Subpath::new_rect(remove_export_center - DVec2::new(8., 8.), remove_export_center + DVec2::new(8., 8.)), 0.);
1871+
let reorder_export = ClickTarget::new_with_subpath(Subpath::new_rectangle(reorder_export_center - DVec2::new(3., 4.), reorder_export_center + DVec2::new(3., 4.)), 0.);
1872+
let remove_export = ClickTarget::new_with_subpath(Subpath::new_rectangle(remove_export_center - DVec2::new(8., 8.), remove_export_center + DVec2::new(8., 8.)), 0.);
18731873
reorder_imports_exports.insert_custom_input_port(*export_index, reorder_export);
18741874
remove_imports_exports.insert_custom_input_port(*export_index, remove_export);
18751875
}
@@ -2482,7 +2482,7 @@ impl NodeNetworkInterface {
24822482
let node_click_target_bottom_right = node_click_target_top_left + DVec2::new(width as f64, height as f64);
24832483

24842484
let radius = 3.;
2485-
let subpath = Subpath::new_rounded_rect(node_click_target_top_left, node_click_target_bottom_right, [radius; 4]);
2485+
let subpath = Subpath::new_rounded_rectangle(node_click_target_top_left, node_click_target_bottom_right, [radius; 4]);
24862486
let node_click_target = ClickTarget::new_with_subpath(subpath, 0.);
24872487

24882488
DocumentNodeClickTargets {
@@ -2507,12 +2507,12 @@ impl NodeNetworkInterface {
25072507

25082508
// Update visibility button click target
25092509
let visibility_offset = node_top_left + DVec2::new(width as f64, 24.);
2510-
let subpath = Subpath::new_rounded_rect(DVec2::new(-12., -12.) + visibility_offset, DVec2::new(12., 12.) + visibility_offset, [3.; 4]);
2510+
let subpath = Subpath::new_rounded_rectangle(DVec2::new(-12., -12.) + visibility_offset, DVec2::new(12., 12.) + visibility_offset, [3.; 4]);
25112511
let visibility_click_target = ClickTarget::new_with_subpath(subpath, 0.);
25122512

25132513
// Update grip button click target, which is positioned to the left of the left most icon
25142514
let grip_offset_right_edge = node_top_left + DVec2::new(width as f64 - (GRID_SIZE as f64) / 2., 24.);
2515-
let subpath = Subpath::new_rounded_rect(DVec2::new(-8., -12.) + grip_offset_right_edge, DVec2::new(0., 12.) + grip_offset_right_edge, [0.; 4]);
2515+
let subpath = Subpath::new_rounded_rectangle(DVec2::new(-8., -12.) + grip_offset_right_edge, DVec2::new(0., 12.) + grip_offset_right_edge, [0.; 4]);
25162516
let grip_click_target = ClickTarget::new_with_subpath(subpath, 0.);
25172517

25182518
// Create layer click target, which is contains the layer and the chain background
@@ -2521,7 +2521,7 @@ impl NodeNetworkInterface {
25212521
let node_bottom_right = node_top_left + DVec2::new(width as f64, height as f64);
25222522
let chain_top_left = node_top_left - DVec2::new((chain_width_grid_spaces * crate::consts::GRID_SIZE) as f64, 0.);
25232523
let radius = 10.;
2524-
let subpath = Subpath::new_rounded_rect(chain_top_left, node_bottom_right, [radius; 4]);
2524+
let subpath = Subpath::new_rounded_rectangle(chain_top_left, node_bottom_right, [radius; 4]);
25252525
let node_click_target = ClickTarget::new_with_subpath(subpath, 0.);
25262526

25272527
DocumentNodeClickTargets {
@@ -2747,7 +2747,7 @@ impl NodeNetworkInterface {
27472747
});
27482748

27492749
let bounds = self.all_nodes_bounding_box(network_path).cloned().unwrap_or([DVec2::ZERO, DVec2::ZERO]);
2750-
let rect = Subpath::<PointId>::new_rect(bounds[0], bounds[1]);
2750+
let rect = Subpath::<PointId>::new_rectangle(bounds[0], bounds[1]);
27512751
let all_nodes_bounding_box = rect.to_bezpath().to_svg();
27522752

27532753
let mut modify_import_export = Vec::new();
@@ -3008,7 +3008,7 @@ impl NodeNetworkInterface {
30083008
return None;
30093009
};
30103010

3011-
let bounding_box_subpath = Subpath::<PointId>::new_rect(bounds[0], bounds[1]);
3011+
let bounding_box_subpath = Subpath::<PointId>::new_rectangle(bounds[0], bounds[1]);
30123012
bounding_box_subpath.bounding_box_with_transform(network_metadata.persistent_metadata.navigation_metadata.node_graph_to_viewport)
30133013
}
30143014

editor/src/messages/portfolio/document_migration.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,7 @@ fn migrate_node(node_id: &NodeId, node: &DocumentNode, network_path: &[NodeId],
10811081
log::error!("The old Spline node's input at index 1 is not a TaggedValue::VecDVec2");
10821082
return None;
10831083
};
1084-
let vector = Vector::from_subpath(Subpath::from_anchors_linear(points.to_vec(), false));
1084+
let vector = Vector::from_subpath(Subpath::from_anchors(points.to_vec(), false));
10851085

10861086
// Retrieve the output connectors linked to the "Spline" node's output connector
10871087
let Some(spline_outputs) = document.network_interface.outward_wires(network_path)?.get(&OutputConnector::node(*node_id, 0)).cloned() else {

editor/src/messages/tool/common_functionality/shape_editor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2155,7 +2155,7 @@ impl ShapeState {
21552155
if polygon.len() < 2 {
21562156
return (points_inside, segments_inside);
21572157
}
2158-
let polygon: Subpath<PointId> = Subpath::from_anchors_linear(polygon.to_vec(), true);
2158+
let polygon: Subpath<PointId> = Subpath::from_anchors(polygon.to_vec(), true);
21592159
Some(polygon)
21602160
} else {
21612161
None

editor/src/messages/tool/tool_messages/select_tool.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,15 +452,15 @@ impl SelectToolData {
452452
if self.lasso_polygon.len() < 2 {
453453
return Vec::new();
454454
}
455-
let polygon = Subpath::from_anchors_linear(self.lasso_polygon.clone(), true);
455+
let polygon = Subpath::from_anchors(self.lasso_polygon.clone(), true);
456456
document.intersect_polygon_no_artboards(polygon, viewport).collect()
457457
}
458458

459459
pub fn is_layer_inside_lasso_polygon(&self, layer: &LayerNodeIdentifier, document: &DocumentMessageHandler, viewport: &ViewportMessageHandler) -> bool {
460460
if self.lasso_polygon.len() < 2 {
461461
return false;
462462
}
463-
let polygon = Subpath::from_anchors_linear(self.lasso_polygon.clone(), true);
463+
let polygon = Subpath::from_anchors(self.lasso_polygon.clone(), true);
464464
document.is_layer_fully_inside_polygon(layer, viewport, polygon)
465465
}
466466

editor/src/node_graph_executor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ impl NodeGraphExecutor {
201201
ExportBounds::Artboard(id) => document.metadata().bounding_box_document(id),
202202
}
203203
.ok_or_else(|| "No bounding box".to_string())?;
204-
let resolution = (bounds[1] - bounds[0]).as_uvec2();
204+
let resolution = (bounds[1] - bounds[0]).round().as_uvec2();
205205
let transform = DAffine2::from_translation(bounds[0]).inverse();
206206

207207
let render_config = RenderConfig {

node-graph/libraries/rendering/src/renderer.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ impl Render for Artboard {
470470

471471
fn collect_metadata(&self, metadata: &mut RenderMetadata, mut footprint: Footprint, element_id: Option<NodeId>) {
472472
if let Some(element_id) = element_id {
473-
let subpath = Subpath::new_rect(DVec2::ZERO, self.dimensions.as_dvec2());
473+
let subpath = Subpath::new_rectangle(DVec2::ZERO, self.dimensions.as_dvec2());
474474
metadata.click_targets.insert(element_id, vec![ClickTarget::new_with_subpath(subpath, 0.)]);
475475
metadata.upstream_footprints.insert(element_id, footprint);
476476
metadata.local_transforms.insert(element_id, DAffine2::from_translation(self.location.as_dvec2()));
@@ -483,7 +483,7 @@ impl Render for Artboard {
483483
}
484484

485485
fn add_upstream_click_targets(&self, click_targets: &mut Vec<ClickTarget>) {
486-
let subpath_rectangle = Subpath::new_rect(DVec2::ZERO, self.dimensions.as_dvec2());
486+
let subpath_rectangle = Subpath::new_rectangle(DVec2::ZERO, self.dimensions.as_dvec2());
487487
click_targets.push(ClickTarget::new_with_subpath(subpath_rectangle, 0.));
488488
}
489489

@@ -1363,7 +1363,7 @@ impl Render for Table<Raster<CPU>> {
13631363

13641364
fn collect_metadata(&self, metadata: &mut RenderMetadata, footprint: Footprint, element_id: Option<NodeId>) {
13651365
let Some(element_id) = element_id else { return };
1366-
let subpath = Subpath::new_rect(DVec2::ZERO, DVec2::ONE);
1366+
let subpath = Subpath::new_rectangle(DVec2::ZERO, DVec2::ONE);
13671367

13681368
metadata.click_targets.insert(element_id, vec![ClickTarget::new_with_subpath(subpath, 0.)]);
13691369
metadata.upstream_footprints.insert(element_id, footprint);
@@ -1374,7 +1374,7 @@ impl Render for Table<Raster<CPU>> {
13741374
}
13751375

13761376
fn add_upstream_click_targets(&self, click_targets: &mut Vec<ClickTarget>) {
1377-
let subpath = Subpath::new_rect(DVec2::ZERO, DVec2::ONE);
1377+
let subpath = Subpath::new_rectangle(DVec2::ZERO, DVec2::ONE);
13781378
click_targets.push(ClickTarget::new_with_subpath(subpath, 0.));
13791379
}
13801380
}
@@ -1423,7 +1423,7 @@ impl Render for Table<Raster<GPU>> {
14231423

14241424
fn collect_metadata(&self, metadata: &mut RenderMetadata, footprint: Footprint, element_id: Option<NodeId>) {
14251425
let Some(element_id) = element_id else { return };
1426-
let subpath = Subpath::new_rect(DVec2::ZERO, DVec2::ONE);
1426+
let subpath = Subpath::new_rectangle(DVec2::ZERO, DVec2::ONE);
14271427

14281428
metadata.click_targets.insert(element_id, vec![ClickTarget::new_with_subpath(subpath, 0.)]);
14291429
metadata.upstream_footprints.insert(element_id, footprint);
@@ -1434,7 +1434,7 @@ impl Render for Table<Raster<GPU>> {
14341434
}
14351435

14361436
fn add_upstream_click_targets(&self, click_targets: &mut Vec<ClickTarget>) {
1437-
let subpath = Subpath::new_rect(DVec2::ZERO, DVec2::ONE);
1437+
let subpath = Subpath::new_rectangle(DVec2::ZERO, DVec2::ONE);
14381438
click_targets.push(ClickTarget::new_with_subpath(subpath, 0.));
14391439
}
14401440
}

0 commit comments

Comments
 (0)