diff src/bprint.cpp @ 4:fdba695b99f1

More fast ( read from DB ). Improve the precision of marksheet judgement.
author pyon@macmini
date Wed, 11 Sep 2013 19:09:14 +0900
parents 1a64119ab257
children bc2e2b304095
line wrap: on
line diff
--- a/src/bprint.cpp	Tue Aug 27 18:50:00 2013 +0900
+++ b/src/bprint.cpp	Wed Sep 11 19:09:14 2013 +0900
@@ -1,5 +1,5 @@
 // Filename   : bprint.cpp
-// Last Change: 27-Aug-2013.
+// Last Change: 11-Sep-2013.
 //
 
 #include "bprint.h"
@@ -135,6 +135,7 @@
 
         wxString file;
         bool cout = dir.GetFirst( &file, wxT("*.jpg"), wxDIR_FILES );
+        bool notyet_mask = true;
         int n = 0;
         wxString tmpdir = wxGetCwd() + wxFILE_SEP_PATH + wxT("tmp") + wxFILE_SEP_PATH;
         while ( cout ) {
@@ -142,7 +143,12 @@
             file.Replace( wxFILE_SEP_PATH, wxT("/") );
             wxString tmpjpg = wxString::Format( wxT("%stmp%d.jpg"), tmpdir, n );
         
-            if ( n == 0 ) {       // 1枚目はマスクする
+            double zmin = 0.095713;
+            double zmax = 0.147142;
+            long lmin = 2072393;
+            long lmax = 2472318;
+
+            if ( notyet_mask && IsMarksheet( file, zmin, zmax, lmin, lmax ) ) {  // マークシート表面をマスクする
                 wxImage img_org( file, wxBITMAP_TYPE_JPEG );
                 int ver = GetMarksheetVersion( file );
                 if ( ver == 2 ) {