Return a copy of the gradient segments. The array of segments is allocated using FXMALLOC and should be freed by the caller using FXFREE.