[niepce] ncr: properly update the orientation
- From: Hubert Figuière <hub src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [niepce] ncr: properly update the orientation
- Date: Sun, 23 Dec 2018 02:53:18 +0000 (UTC)
commit f127c726ae79ed94766caedd5b358a55fd7dc335
Author: Hubert Figuière <hub figuiere net>
Date: Sat Dec 22 19:36:57 2018 -0500
ncr: properly update the orientation
src/ncr/image.cpp | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/src/ncr/image.cpp b/src/ncr/image.cpp
index a536e42..59a2a5d 100644
--- a/src/ncr/image.cpp
+++ b/src/ncr/image.cpp
@@ -108,29 +108,44 @@ GeglNode* Image::Private::_rotate_node(int orientation)
switch(orientation) {
case 0:
case 1:
+ m_orientation = 0;
+ m_vertical = false;
+ m_flip = false;
break;
case 2:
+ m_orientation = 0;
+ m_vertical = false;
m_flip = true;
break;
case 4:
+ m_orientation = 180;
+ m_vertical = false;
m_flip = true;
- // fall through
+ break;
case 3:
m_orientation = 180;
+ m_vertical = false;
+ m_flip = false;
break;
case 5:
+ m_orientation = 270;
+ m_vertical = true;
m_flip = true;
- // fall through
+ break;
case 6:
m_orientation = 270;
m_vertical = true;
+ m_flip = false;
break;
case 7:
+ m_orientation = 90;
+ m_vertical = true;
m_flip = true;
- // fall through
+ break;
case 8:
m_orientation = 90;
m_vertical = true;
+ m_flip = false;
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]