pub fn update_shape(&mut self, document: &DocumentMessageHandler, responses: &mut VecDeque<Message>) {
		let viewport_transform = document.graphene_document.generate_transform_relative_to_viewport(&self.layer_path).unwrap();
		let layer = document.graphene_document.layer(&self.layer_path).unwrap();
		if let LayerDataType::Shape(shape) = &layer.data {
			let path = shape.path.clone();
			self.transform = viewport_transform;

			// Update point positions
			self.update_anchors_from_kurbo(&path);

			self.bez_path = path;

			// Update the overlays to represent the changes to the kurbo path
			self.place_shape_outline_overlay(responses);
			self.place_anchor_overlays(responses);
			self.place_handle_overlays(responses);
		}
	}
/// Update the anchors and segments to match the kurbo shape
/// Should be called whenever the kurbo shape changes
Update the anchors and segments to match the kurbo shape
Should be called whenever the kurbo shape changes
Update the anchors and segments to match the kurbo shape Should be called whenever the kurbo shape changes
pub fn update_shape(&mut self, document: &DocumentMessageHandler, responses: &mut VecDeque<Message>) {
		let viewport_transform = document.graphene_document.generate_transform_relative_to_viewport(&self.layer_path).unwrap();
		let layer = document.graphene_document.layer(&self.layer_path).unwrap();
		if let LayerDataType::Shape(shape) = &layer.data {
			let path = shape.path.clone();
			self.transform = viewport_transform;
			// Update point positions
			self.update_anchors_from_kurbo(&path);
			self.bez_path = path;
			// Update the overlays to represent the changes to the kurbo path
			self.place_shape_outline_overlay(responses);
			self.place_anchor_overlays(responses);
			self.place_handle_overlays(responses);
		}
	}
pub fn update_shape ( & mut self , document : & DocumentMessageHandler , responses : & mut VecDeque < Message > ) { let viewport_transform = document . graphene_document . generate_transform_relative_to_viewport ( & self . layer_path ) . unwrap ( ) ; let layer = document . graphene_document . layer ( & self . layer_path ) . unwrap ( ) ; if let LayerDataType :: Shape ( shape ) = & layer . data { let path = shape . path . clone ( ) ; self . transform = viewport_transform ; // Update point positions self . update_anchors_from_kurbo ( & path ) ; self . bez_path = path ; // Update the overlays to represent the changes to the kurbo path self . place_shape_outline_overlay ( responses ) ; self . place_anchor_overlays ( responses ) ; self . place_handle_overlays ( responses ) ; } }
Update the anchors and segments to match the kurbo shape
Should be called whenever the kurbo shape changes
Update the anchors and segments to match the kurbo shape Should be called whenever the kurbo shape changes
&mut self
document
&DocumentMessageHandler
responses
&mut VecDeque<Message>
&mut self
document
&DocumentMessageHandler
responses
&mut VecDeque<Message>