Revert "avoid overflowing"

This reverts commit ebd183d58e2e8914c79e0bf304ba3bbfdb433cdc.
refactor clipping_extent into separate header for sharing
move render_pattern into sepratre compilation module