mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 22:28:10 +08:00
Fix regressions introduced in the vector nodes migration (#1100)
* Fix double click to enter path tool * Fix error * Fix transform bug * Fix squaring scale on images * Shift node position and refresh graph * Downscale node seperate * Fix mirror * Remove duplicate transform * Always show node graph * Correctly set freehand and spline tool positions * Run cargo format * Maybe fix the scale * Downscaled image is always smaller than origional * Fix one crash * Don't show node graph on welcome screen * Reduce default graph panel height --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
committed by
Keavon Chambers
parent
92fe0bea50
commit
d710285029
@@ -94,8 +94,8 @@ pub struct DownscaleNode;
|
||||
|
||||
#[node_macro::node_fn(DownscaleNode)]
|
||||
fn downscale(image_frame: ImageFrame) -> ImageFrame {
|
||||
let target_width = image_frame.transform.transform_vector2((1., 0.).into()).length() as usize;
|
||||
let target_height = image_frame.transform.transform_vector2((0., 1.).into()).length() as usize;
|
||||
let target_width = (image_frame.transform.transform_vector2((1., 0.).into()).length() as usize).min(image_frame.image.width as usize);
|
||||
let target_height = (image_frame.transform.transform_vector2((0., 1.).into()).length() as usize).min(image_frame.image.height as usize);
|
||||
|
||||
let mut image = Image {
|
||||
width: target_width as u32,
|
||||
|
||||
Reference in New Issue
Block a user