Code

fix pmg
authorbuliabyak <buliabyak@users.sourceforge.net>
Sun, 2 Dec 2007 23:05:58 +0000 (23:05 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Sun, 2 Dec 2007 23:05:58 +0000 (23:05 +0000)
src/dialogs/clonetiler.cpp

index 60750796f89f23130c70beb3cd6dcde393e15fc7..09086f1b203695cea731e8581ded3e9e22fc9f9a 100644 (file)
@@ -348,14 +348,18 @@ clonetiler_get_transform (
         break;
 
     case TILE_PMG:
-        if (y % 4 == 0) {
-            return d_s_r * rect_translate;
-        } else if (y % 4 == 1) {
-            return d_s_r * flip_y * rect_translate;
-        } else if (y % 4 == 2) {
-            return d_s_r * flip_x * rect_translate;
-        } else if (y % 4 == 3) {
-            return d_s_r * flip_x * flip_y * rect_translate;
+        if (y % 2 == 0) {
+            if (x % 2 == 0) {
+                return d_s_r * rect_translate;
+            } else {
+                return d_s_r * rotate_180_c * rect_translate;
+            }
+        } else {
+            if (x % 2 == 0) {
+                return d_s_r * flip_y * rect_translate;
+            } else {
+                return d_s_r * rotate_180_c * flip_y * rect_translate;
+            }
         }
         break;