mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-08 15:28:00 +00: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:
parent
92fe0bea50
commit
d710285029
23 changed files with 105 additions and 118 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue