From: Ethan Rublee Date: Tue, 22 Mar 2011 23:12:33 +0000 (+0000) Subject: adding better support for asymmetric patterns. X-Git-Tag: accepted/2.0/20130307.220821~3412 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e7579b90e5f6e0e4a18c316ebf10e1d746bc1709;p=profile%2Fivi%2Fopencv.git adding better support for asymmetric patterns. --- diff --git a/doc/pattern_tools/gen_pattern.py b/doc/pattern_tools/gen_pattern.py index 7d415ac..183d946 100644 --- a/doc/pattern_tools/gen_pattern.py +++ b/doc/pattern_tools/gen_pattern.py @@ -34,16 +34,11 @@ class PatternMaker: def makeACirclesPattern(self): spacing = self.square_size r = spacing / 5.0 - row_shift = 0 - for y in range(1,self.rows+1): - for x in range(1,self.cols+1): - dot = SVG("circle", cx= (x + row_shift/2.0) * spacing, cy=y * spacing, r=r, fill="black") + for i in range(0,self.rows): + for j in range(0,self.cols): + dot = SVG("circle", cx= ((j*2 + i%2)*spacing) + spacing, cy=self.height - (i * spacing + spacing), r=r, fill="black") self.g.append(dot) - #this makes the pattern asymetric - if row_shift is 0: - row_shift = 1 - else: - row_shift = 0 + def makeCheckerboardPattern(self): spacing = self.square_size r = spacing / 5.0