From 561a374cc01c0a1d3cf3e000f3e55e36b347316d Mon Sep 17 00:00:00 2001 From: Variable <77773850+Variable-ind@users.noreply.github.com> Date: Sat, 20 Jan 2024 05:06:44 +0500 Subject: [PATCH] Fixed rotation gixmo (#976) --- src/UI/Dialogs/ImageEffects/RotateImage.gd | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/UI/Dialogs/ImageEffects/RotateImage.gd b/src/UI/Dialogs/ImageEffects/RotateImage.gd index 741639d3f..b2c51d63c 100644 --- a/src/UI/Dialogs/ImageEffects/RotateImage.gd +++ b/src/UI/Dialogs/ImageEffects/RotateImage.gd @@ -250,13 +250,14 @@ func _on_Indicator_draw() -> void: else: conversion_scale = ratio.y var pivot_position := pivot * conversion_scale - pivot_indicator.draw_arc(pivot_position, 2, 0, 360, 360, Color.YELLOW, 0.5) - pivot_indicator.draw_arc(pivot_position, 6, 0, 360, 360, Color.WHITE, 0.5) + var width = 1 + pivot_indicator.draw_arc(pivot_position, 2, 0, 360, 360, Color.YELLOW, width) + pivot_indicator.draw_arc(pivot_position, 6, 0, 360, 360, Color.WHITE, width) pivot_indicator.draw_line( - pivot_position - Vector2.UP * 10, pivot_position - Vector2.DOWN * 10, Color.WHITE, 0.5 + pivot_position - Vector2.UP * 10, pivot_position - Vector2.DOWN * 10, Color.WHITE, width ) pivot_indicator.draw_line( - pivot_position - Vector2.RIGHT * 10, pivot_position - Vector2.LEFT * 10, Color.WHITE, 0.5 + pivot_position - Vector2.RIGHT * 10, pivot_position - Vector2.LEFT * 10, Color.WHITE, width ) @@ -267,8 +268,7 @@ func _on_Indicator_gui_input(event: InputEvent) -> void: drag_pivot = false if drag_pivot: var img_size := preview_image.get_size() -# var mouse_pos := get_local_mouse_position() - pivot_indicator.position - var mouse_pos := pivot_indicator.position + var mouse_pos := pivot_indicator.get_local_mouse_position() var ratio := Vector2(img_size) / pivot_indicator.size # we need to set the scale according to the larger side var conversion_scale: float