Skip to content

Commit f292755

Browse files
committed
now drawing lines above and below list items instead of rectangles for cesine#2
1 parent b70e5aa commit f292755

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

android/jni/imagefuncs.cpp

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -128,32 +128,38 @@ vector<vector<Point> > getCropOfToDoLines(vector<vector<Point> > checkboxes, Mat
128128

129129

130130
// Draw rectangle
131-
rectangle(
132-
mbgra,
133-
Rect(a,
134-
b,
135-
c,
136-
d), Scalar(200, 200, 0, 255), 2);
131+
//rectangle(
132+
// mbgra,
133+
// Rect(a,
134+
// b,
135+
// c,
136+
// d), Scalar(200, 200, 0, 255), 2);
137137

138138

139139
// Draw cross-hairs
140140
int width = mbgra.size[0];
141141
int height = mbgra.size[1];
142-
line(mbgra, Point(width * 0.5, height * 0.4),
143-
Point(width * 0.5, height * 0.6), Scalar(0, 0, 0, 255), 2);
144-
line(mbgra, Point(width * 0.4, height * 0.5),
145-
Point(width * 0.6, height * 0.5), Scalar(0, 0, 0, 255), 2);
142+
line(mbgra
143+
, Point(rect.x, 0)
144+
, Point(rect.x, height )
145+
, Scalar(200, 200, 0, 255)
146+
, 2);
147+
line(mbgra
148+
, Point(rect.x + rect.width, 0)
149+
, Point(rect.x + rect.width, height)
150+
, Scalar(200, 0, 0, 255)
151+
, 2);
146152

147153

148154
//cvLine(mbgra, pt1, pt2, Scalar(0, 200,200, 255), 2)
149-
Mat imgroi = mbgra(Rect(a, b, c, d));
155+
//Mat imgroi = mbgra(Rect(a, b, c, d));
150156

151157
//CString cs;
152158
//cs.Format("/sdcard/Todos/temp%d", i);
153159
//LOGI(cs);
154160

155161
//imwrite(cs, imgroi);
156-
imwrite("/sdcard/Todos/afilename.png", imgroi);
162+
//imwrite("/sdcard/Todos/afilename.png", imgroi);
157163

158164

159165
}

0 commit comments

Comments
 (0)