From 21e9817347105611a049eac49131dbd83ae9b265 Mon Sep 17 00:00:00 2001
From: Phil Howard <phil@gadgetoid.com>
Date: Thu, 18 Apr 2024 10:57:37 +0100
Subject: [PATCH] TEST: PicoVector: Swap rotate translation order.

---
 libraries/pico_vector/pico_vector.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libraries/pico_vector/pico_vector.cpp b/libraries/pico_vector/pico_vector.cpp
index 4a609f32b..25d533b9f 100644
--- a/libraries/pico_vector/pico_vector.cpp
+++ b/libraries/pico_vector/pico_vector.cpp
@@ -17,9 +17,9 @@ namespace pimoroni {
 
   void PicoVector::rotate(pp_path_t *path, pp_point_t origin, float angle) {
     pp_mat3_t t = pp_mat3_identity();
-    pp_mat3_translate(&t, -origin.x, -origin.y);
-    pp_mat3_rotate(&t, angle);
     pp_mat3_translate(&t, origin.x, origin.y);
+    pp_mat3_rotate(&t, angle);
+    pp_mat3_translate(&t, -origin.x, -origin.y);
     transform(path, &t);
   }
 
@@ -37,9 +37,9 @@ namespace pimoroni {
 
   void PicoVector::rotate(pp_poly_t *poly, pp_point_t origin, float angle) {
     pp_mat3_t t = pp_mat3_identity();
-    pp_mat3_translate(&t, -origin.x, -origin.y);
-    pp_mat3_rotate(&t, angle);
     pp_mat3_translate(&t, origin.x, origin.y);
+    pp_mat3_rotate(&t, angle);
+    pp_mat3_translate(&t, -origin.x, -origin.y);
     transform(poly, &t);
   }