add obtain_from_generic() method and improve result printing in CGradientResult class