change the draw lines function to use global filter state.