fn gradient_space_transform(path: &[LayerId], layer: &Layer, document: &DocumentMessageHandler) -> DAffine2 {
	let bounds = layer.aabounding_box_for_transform(DAffine2::IDENTITY, &document.graphene_document.font_cache).unwrap();
	let bound_transform = DAffine2::from_scale_angle_translation(bounds[1] - bounds[0], 0., bounds[0]);

	let multiplied = document.graphene_document.multiply_transforms(path).unwrap();

	multiplied * bound_transform
}
/// Computes the transform from gradient space to layer space (where gradient space is 0..1 in layer space)
Computes the transform from gradient space to layer space (where gradient space is 0..1 in layer space)
Computes the transform from gradient space to layer space ( where gradient space is 0 .. 1 in layer space )
fn gradient_space_transform(path: &[LayerId], layer: &Layer, document: &DocumentMessageHandler) -> DAffine2 {
	let bounds = layer.aabounding_box_for_transform(DAffine2::IDENTITY, &document.graphene_document.font_cache).unwrap();
	let bound_transform = DAffine2::from_scale_angle_translation(bounds[1] - bounds[0], 0., bounds[0]);
	let multiplied = document.graphene_document.multiply_transforms(path).unwrap();
	multiplied * bound_transform
}
fn gradient_space_transform ( path : & [ LayerId ] , layer : & Layer , document : & DocumentMessageHandler ) -> DAffine2 { let bounds = layer . aabounding_box_for_transform ( DAffine2 :: IDENTITY , & document . graphene_document . font_cache ) . unwrap ( ) ; let bound_transform = DAffine2 :: from_scale_angle_translation ( bounds [ 1 ] - bounds [ 0 ] , 0. , bounds [ 0 ] ) ; let multiplied = document . graphene_document . multiply_transforms ( path ) . unwrap ( ) ; multiplied * bound_transform }
Computes the transform from gradient space to layer space (where gradient space is 0..1 in layer space)
Computes the transform from gradient space to layer space ( where gradient space is 0 .. 1 in layer space )
path
&[LayerId]
layer
&Layer
document
&DocumentMessageHandler
path
&[LayerId]
layer
&Layer
document
&DocumentMessageHandler