function horizontalScale(factor) {
  return (onRefs, onOffsets, offOffsets) => {
    const scaledOnRefs = onRefs.map(pt => [ pt[0] * factor, pt[1] ]);
    const scaledOffOffsets = offOffsets.map(pt => [ pt[0] * factor, pt[1] ]);
    return [ scaledOnRefs, onOffsets, scaledOffOffsets ];
  }
}
Morphological scaling 
@param { number } factor Scale factor
@returns { Filter }