Hello. I've got an assignment to mimic gradient behaviour from SVG on OpenVG platform. I've managed to get identical results with horizontal linear, vertical linear and radial gradients, but, I cannot anyhow get proper result with linear gradient that has angle.
Here is an example...
This is a snapshot of (20, 20)-(460, 120) gradient drawn by a SVG viewer (tried with few of them; the result is ever the same):
If drawn with OpenVG, this is what I get:
'Stripes' are obviously placed in the wrong direction. I've tried many things and I've simply cannot get them right.
However, there is one thing I've noticed - stripes are always at the 90 degrees compared to the SVG ones, so, if I swap x and y coordinates, stripes indeed start looking into the right direction, but, color stops aren't good at all then (of course).
Is there any help? Tnx.