chiark / gitweb /
Cope with display which doesn't have a commod pixel-exactly at the top
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 16 Aug 2009 20:41:27 +0000 (21:41 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sun, 16 Aug 2009 20:41:27 +0000 (21:41 +0100)
yarrg/structure.c

index f10addc56eed9c65f77ede4809407333a4ca780a..99042d0c74961c5b064c19875b8af0c89ce37dca 100644 (file)
@@ -313,12 +313,16 @@ void find_structure(const CanonImage *im,
 
 #define CHECK_STRIP_BORDER(tlbr,xy,increm)             \
   do {                                                 \
-    Point csb_p;                                       \
+    Point csb_p, csb_p2;                               \
     Rect csb_r;                                                \
     csb_p= s.mr.tl;                                    \
     csb_p.x++; csb_p.y++;                              \
+    csb_p2= csb_p;                                     \
+    csb_p2.x++; csb_p2.y++;                            \
     csb_p.xy= s.mr.tlbr.xy;                            \
-    if (get_p(csb_p)=='+') {                           \
+    csb_p2.xy= s.mr.tlbr.xy;                           \
+    if (get_p(csb_p)=='+' &&                           \
+       get_p(csb_p2)=='+') {                           \
       csb_r= s.mr;                                     \
       csb_r.tl.xy= csb_p.xy;                           \
       csb_r.br.xy= csb_p.xy;                           \