CPP : Add support for left to right gradient