add functionality to flip drawing horizontally

This commit is contained in:
2025-08-12 22:25:16 +01:00
parent 55fe9b7605
commit 4a9b5947e7
9 changed files with 32 additions and 2 deletions

View File

@@ -369,6 +369,15 @@ struct
in (model, [])
end
fun flipHorizontally (model: app_type) =
let
val {layerTree, arrowX, arrowY, ...} = model
val layerTree = LayerTree.flipHorizontally layerTree
val model = AppWith.layerTree (model, layerTree, arrowX, arrowY)
in
getDrawMessage (model, [])
end
fun update (model: app_type, inputMsg) =
case inputMsg of
MOUSE_MOVE {x = mouseX, y = mouseY} =>
@@ -388,6 +397,7 @@ struct
| KEY_W => updateCanvasWidth model
| KEY_H => updateCanvasHeight model
| KEY_M => enterMoveMode model
| KEY_F => flipHorizontally model
| RESIZE_WINDOW {width, height} => resizeWindow (model, width, height)
| UNDO_ACTION => undoAction model
| REDO_ACTION => redoAction model