2 Replies Latest reply on Feb 5, 2013 9:46 AM by Gustavo Del Vechio

    Changing the angle of a linear gradient fill

    Gustavo Del Vechio Level 3

      Hi friends

       

      Suppose I have an object filled with a linear gradient. This object is the only selected. I just would like to change the angle of the gradient to 25 degrees. So I think I could do:

       

      var doc = app.activeDocument

       

      alert(doc.selection[0].fillColor.angle) // the result is the exact angle of the gradient fill of the selected object. Suppose 12 degrees.

       

      //now the try to change:

       

      doc.selection[0].fillColor.angle = 25.0

       

      ---

       

      No errors are found by the Extended Script Toolkit..BUT...it does not change anything. As Illustrator reference manual does not say this property is read only, I think I could write.

       

      Am I missing anything?

       

      Thank you a lot for the help

      Best Regards

      Gustavo.