The meaning of rho variable in Reference Implementation.

Now I studying OpenVG using Reference Implementation.

But I have a difficult in the Gradient Fill.

In the RI, they use rho variable.
(riPixelPipe.cpp -> PixelPipe::linearGradient)

however, I can’t understand that meaning.

If you know, please tell me about that meaning.

Quick look indicates to me like it’s probably related to the size of the filter kernel that should be used (but I could be wrong I suppose).
In plain english:

  • you know the pixel center has a gradient value of… say 0.65
    But what about the rest of the pixel?
  • the reference implementation probably attempts to average out the color across the entire pixel, so it needs to know if the edge of the pixel has a value of 0.64999 or 0.15. In other words rho is probably the values that quantifies the question ‘how much of the color ramp is located inside the pixel?’. The reference implementation will probably try to average the colors it covers to avoid any high frequency noise that would result if you just point sampled at 0.65 (on color ramps that repeated every few pixels).

It’s just another reason why the reference implementation is so horribly slow, I guess. But hey - the output looks nice… eventually.