Jump to content
Developer Wiki and Function Reference Links ×

gradient fill angle


Recommended Posts

  • 6 years later...

SetObjectVariableReal(FSActLayer, 74, Deg2Rad(10));

will set the Gradient angle to 10 degrees in the first selected object on the active layer, assuming it has a gradient fill.

I played with Gradients extensively 5 years ago and it was not easy. Luckily, I've forgotten most of the headaches. Your best bet to see how they work is to create an object with a gradient fill, duplicate it and distort the copies, then export the file to a VectorScript file and try to see what changes among your objects.

The good news is Image Fills are worse.

As Dave Carpenter pointed out, the angle must be expressed in Radians.

HTH,

Raymond

Link to comment

Raymond,

Thanks for your response, I apologize for not seeing it earlier. Unfortunately I'm very familiar with the same headaches you had years ago. I'm still in the process of figuring things out but the functions below have been helpful so far. We'll see how far they get me.

SetFillIAxisEndPoint

SetFillJAxisEndPoint

Still figuring things out, I'll keep you updated...

Dave

Link to comment

I was finally able to get my gradient to map correctly using:

SetFillOriginPoint(handle,AGRAD.x,AGRAD.y); {begining point of the gradient}

SetFillIAxisEndPoint(handle,BGRAD.x,BGRAD.y); {ending point of the gradient}

but wound up not having to use SetFillJAxisEndPoint(handle,AGRAD.x,AGRAD.y); in my script.

Dave

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...