'return a tuple of two vertices for the colorbar extended ends.
The first vertices is for the minimum end, and the second is for
the maximum end.'

def get_end_vertices(self):

    extesion_fraction = self.extesion_fraction
    corx = (extesion_fraction * 2.0)
    cory = (1.0 / (1.0 - corx))
    (x1, y1, w, h) = (0, 0, 1, 1)
    (x2, y2) = ((x1 + w), (y1 + h))
    (dw, dh) = ((w * extesion_fraction), ((h * extesion_fraction) * cory))
    if (self.extend in [u'min', u'both']):
        bottom = [(x1, y1), ((x1 + (w / 2.0)), (y1 - dh)), (x2, y1)]
    else:
        bottom = [(x1, y1), (x2, y1)]
    if (self.extend in [u'max', u'both']):
        top = [(x2, y2), ((x1 + (w / 2.0)), (y2 + dh)), (x1, y2)]
    else:
        top = [(x2, y2), (x1, y2)]
    if (self.orientation == u'horizontal'):
        bottom = [(y, x) for (x, y) in bottom]
        top = [(y, x) for (x, y) in top]
    return (bottom, top)
