As I understand fill can be either Color or LinearGradientFill or RadialGradientFill or ImageFill. What is the proper way to understand what fill was applied. I checked typeof but it doesn’t work. I believe LinearGradientFill is not scenegraph module but which one instead?
the thing is that – despite what the docs say (@ashryan any update about this ?) , LinearGradientFill is actually called LinearGradient and RadialGradientFill (which, of course, doesn’t have a doc page, yet) is actually called RadialGradient.
You’ll find that typof LinearGradient and typeof RadialGradient will produce evaluate to functions jjust like Color.
Therefore, the answer to your question is that it is in the scenegraph module, but wrongly documented (see this issue for further reference)…
Probably, LinearGradient is the name with which it gets exported from the module (removing the fill part to ensure consistency with things like Color) and LinearGradientFill is the “implementation” name…
class LinearGradientFill {}
module.exports = {
LinearGradient: LinearGradientFill
}