How to distinguish linear and radial gradients in Javascript
Hey guys,
I've noticed that certain some scripts im using cant always target both linear and radial gradients. I was curious as to why that was and where the information about weather a gradient is linear or radial is stored or how it can be accessed. So far no luck.
This is what i have so far, it doesnt tell me anything beyond that a given pathItem has a "GradientColor." as it's fillColor I cant figure out the syntax to test if it's linear or radial.
#target illustrator
var doc = app.activeDocument
for(x=0; x<doc.pathItems.length; x++){
alert (doc.activeLayer.pathItems[0].fillColor);
}
I've tried attaching the following to the end but it always returnes undefined.
.type
.typename
.gradient
.GradientType
and anything else i could find in the refrence guide for CS6.
Any advice or direction would be greatly appreciated.