'Return name of an ExtGState that sets alpha to the given value'

def alphaState(self, alpha):

    state = self.alphaStates.get(alpha, None)
    if (state is not None):
        return state[0]
    name = Name((u'A%d' % self.nextAlphaState))
    self.nextAlphaState += 1
    self.alphaStates[alpha] = (name, {u'Type': Name(u'ExtGState'), u'CA': alpha[0], u'ca': alpha[1]})
    return name
