- if self._hidden_group:
- return False
- for layer in self._layers:
- if isinstance(layer, (Group, TileGrid)):
- if layer._fill_area( # pylint: disable=protected-access
- colorspace, area, mask, buffer
- ):
- return True
+ if not self._hidden_group:
+ for layer in reversed(self._layers):
+ if isinstance(layer, (Group, TileGrid, _VectorShape)):
+ if layer._fill_area( # pylint: disable=protected-access
+ colorspace, area, mask, buffer
+ ):
+ return True