'Return name of a marker XObject representing the given path.'

def markerObject(self, path, trans, fill, stroke, lw, joinstyle, capstyle):

    pathops = self.pathOperations(path, trans, simplify=False)
    key = (tuple(pathops), bool(fill), bool(stroke), joinstyle, capstyle)
    result = self.markers.get(key)
    if (result is None):
        name = Name((u'M%d' % len(self.markers)))
        ob = self.reserveObject((u'marker    %d' % len(self.markers)))
        bbox = path.get_extents(trans)
        self.markers[key] = [name, ob, bbox, lw]
    else:
        if (result[(-1)] < lw):
            result[(-1)] = lw
        name = result[0]
    return name
