fix(minor): apply canvas transform handle bbox detection

This commit is contained in:
Beriff
2026-03-14 02:19:46 +07:00
parent e7dc799f54
commit e054fc4fe7

View File

@@ -245,6 +245,8 @@ void vektor_appstate_canvas_drag_begin(GtkGestureDrag* gesture, gdouble x,
V2 position =
(V2){(2 * (x / widget_w)) - 1, 1 - (2 * (y / widget_h))};
position =
m33_transform(m33_inverse(state->renderInfo->canvasMat), (V2){position.x, position.y});
if(state->selectedShape != NULL) {
VektorShape* selectedShape = state->selectedShape;
@@ -281,6 +283,8 @@ void vektor_appstate_canvas_drag_update(GtkGestureDrag* gesture, gdouble x,
V2 position = (V2){(2 * ((x + start_x) / widget_w)) - 1,
1 - (2 * ((y + start_y) / widget_h))};
position =
m33_transform(m33_inverse(state->renderInfo->canvasMat), (V2){position.x, position.y});
// drag handle if selected
if(state->selectedShape != NULL && state->heldHandleIndex != -1) {