MCPcopy Index your code
hub / github.com/clips/pattern / find

Method find

pattern/web/pdf/utils.py:256–266  ·  view source on GitHub ↗
(self, (x0,y0,x1,y1))

Source from the content-addressed store, hash-verified

254
255 # find(): finds objects that are in a certain area.
256 def find(self, (x0,y0,x1,y1)):
257 done = set()
258 for k in self._getrange((x0,y0,x1,y1)):
259 if k not in self._grid: continue
260 for obj in self._grid[k]:
261 if obj in done: continue
262 done.add(obj)
263 if (obj.x1 <= x0 or x1 <= obj.x0 or
264 obj.y1 <= y0 or y1 <= obj.y0): continue
265 yield obj
266 return
267
268
269# create_bmp

Callers 15

strip_elementFunction · 0.45
_parse_articleMethod · 0.45
tablesMethod · 0.45
find_neighborsMethod · 0.45
find_neighborsMethod · 0.45
isanyMethod · 0.45
unknown_starttagMethod · 0.45
unknown_endtagMethod · 0.45
parse_declarationMethod · 0.45
trackNamespaceMethod · 0.45
_mapToStandardPrefixMethod · 0.45
startElementNSMethod · 0.45

Calls 2

_getrangeMethod · 0.95
addMethod · 0.45

Tested by 2

test_findMethod · 0.36
test_findMethod · 0.36