implement bitfunc-rect