docs: def get_line_pattern_rules(declarations, dirs):
      """ Given a list of declarations, return a list of output.Rule objects.
          
          Optionally provide an output directory for local copies of image files.
      """
      property_map = {'line-pattern-file': 'file', 'line-pattern-width': 'width',
                      'line-pattern-height': 'height', 'line-pattern-type': 'type',
                      'line-pattern-meta-output': 'meta-output', 'line-pattern-meta-writer': 'meta-writer'}
  
      
      property_names = property_map.keys()
      
      # a place to put rules
      rules = []
      
      for (filter, values) in filtered_property_declarations(declarations, property_names):
      
          line_pattern_file, line_pattern_type, line_pattern_width, line_pattern_height \
              = values.has_key('line-pattern-file') \
              and post_process_symbolizer_image_file(str(values['line-pattern-file'].value), dirs) \
              or (None, None, None, None)
          
          line_pattern_width = values.has_key('line-pattern-width') and values['line-pattern-width'].value or line_pattern_width
          line_pattern_height = values.has_key('line-pattern-height') and values['line-pattern-height'].value or line_pattern_height
          symbolizer = line_pattern_file and output.LinePatternSymbolizer(line_pattern_file, line_pattern_type, line_pattern_width, line_pattern_height)
          
          if symbolizer:
              rules.append(make_rule(filter, symbolizer))
      
      return rules