[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/krita/image
From:       BenoƮt Jacob <jacob () math ! jussieu ! fr>
Date:       2008-08-21 6:26:12
Message-ID: 1219299972.530123.7280.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 850255 by bjacob:

think i got 2d array indexing order wrong in previous commit.
Please test or tell me how i can test!



 M  +3 -2      kis_perspective_math.cpp  


--- trunk/koffice/krita/image/kis_perspective_math.cpp #850254:850255
@@ -84,9 +84,10 @@
     a.coeffRef(8,8) = 1;
     b.coeffRef(8) = 1;
 //     dbgImage <<" a := { {" << a.coeffRef(0,0) <<" ," << a.coeffRef(0,1) <<" ," << \
a.coeffRef(0,2) <<" ," << a.coeffRef(0,3) <<" ," << a.coeffRef(0,4) <<" ," << \
a.coeffRef(0,5) <<" ," << a.coeffRef(0,6) <<" ," << a.coeffRef(0,7) <<" ," << \
a.coeffRef(0,8) <<" } , {" << a.coeffRef(1,0) <<" ," << a.coeffRef(1,1) <<" ," << \
a.coeffRef(1,2) <<" ," << a.coeffRef(1,3) <<" ," << a.coeffRef(1,4) <<" ," << \
a.coeffRef(1,5) <<" ," << a.coeffRef(1,6) <<" ," << a.coeffRef(1,7) <<" ," << \
a.coeffRef(1,8) <<" } , {" << a.coeffRef(2,0) <<" ," << a.coeffRef(2,1) <<" ," << \
a.coeffRef(2,2) <<" ," << a.coeffRef(2,3) <<" ," << a.coeffRef(2,4) <<" ," << \
a.coeffRef(2,5) <<" ," << a.coeffRef(2,6) <<" ," << a.coeffRef(2,7) <<" ," << \
a.coeffRef(2,8) <<" } , {" << a.coeffRef(3,0) <<" ," << a.coeffRef(3,1) <<" ," << \
a.coeffRef(3,2) <<" ," << a.coeffRef(3,3) <<" ," << a.coeffRef(3,4) <<" ," << \
a.coeffRef(3,5) <<" ," << a.coeffRef(3,6) <<" ," << a.coeffRef(3,7) <<" ," << \
a.coeffRef(3,8) <<" } , {" << a.co  effRef(4,0) <<" ," << a.coeffRef(4,1) <<" ," << \
a.coeffRef(4,2) <<" ," << a.coeffRef(4,3) <<" ," << a.coeffRef(4,4) <<" ," << \
a.coeffRef(4,5) <<" ," << a.coeffRef(4,6) <<" ," << a.coeffRef(4,7) <<" ," << \
a.coeffRef(4,8) <<" } , {" << a.coeffRef(5,0) <<" ," << a.coeffRef(5,1) <<" ," << \
a.coeffRef(5,2) <<" ," << a.coeffRef(5,3) <<" ," << a.coeffRef(5,4) <<" ," << \
a.coeffRef(5,5) <<" ," << a.coeffRef(5,6) <<" ," << a.coeffRef(5,7) <<" ," << \
a.coeffRef(5,8) <<" } , {" << a.coeffRef(6,0) <<" ," << a.coeffRef(6,1) <<" ," << \
a.coeffRef(6,2) <<" ," << a.coeffRef(6,3) <<" ," << a.coeffRef(6,4) <<" ," << \
a.coeffRef(6,5) <<" ," << a.coeffRef(6,6) <<" ," << a.coeffRef(6,7) <<" ," << \
a.coeffRef(6,8) <<" } , {"<< a.coeffRef(7,0) <<" ," << a.coeffRef(7,1) <<" ," << \
a.coeffRef(7,2) <<" ," << a.coeffRef(7,3) <<" ," << a.coeffRef(7,4) <<" ," << \
a.coeffRef(7,5) <<" ," << a.coeffRef(7,6) <<" ," << a.coeffRef(7,7) <<" ," << \
a.coeffRef(7,8) <<" } , {"<< a.coeffRef(8,0) <<" ," << a.coeffRef(8,1) <  <" ," << \
a.coeffRef(8,2) <<" ," << a.coeffRef(8,3) <<" ," << a.coeffRef(8,4) <<" ," << \
a.coeffRef(8,5) <<" ," << a.coeffRef(8,6) <<" ," << a.coeffRef(8,7) <<" ," << \
a.coeffRef(8,8) <<" } };"; +    Vector9qreal v;
+    a.lu().solve(b, &v);
     Matrix3qreal matrix;
-    Eigen::Map<Vector9qreal> map_matrix_as_vector(matrix.data());
-    a.lu().solve(b, &map_matrix_as_vector);
+    for(int r = 0; r < 3; r++) for(int c = 0; c < 3; c++) matrix.coeffRef(r,c) = \
v.coeff(3*r+c);  return matrix;
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic