David Poiron Posted April 8, 2005 Share Posted April 8, 2005 I am trying to set the gradient fill angle of a wall, based on its rotation angle. I have found a number of vectorscript procedures that are for gradient fills, but do not know how to tie them together to determine the fill angle. Anyone know how this might be done? Quote Link to comment
DCarpenter Posted May 13, 2011 Share Posted May 13, 2011 I don't know a lot about this but you might want the look at: SetObjectVariableReal(ObjHandle,Index,angle(in radians)) I found this when exporting to vectorscript a rectangle with a gradiant. Quote Link to comment
MullinRJ Posted May 13, 2011 Share Posted May 13, 2011 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 Quote Link to comment
DCarpenter Posted May 18, 2011 Share Posted May 18, 2011 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 Quote Link to comment
DCarpenter Posted May 19, 2011 Share Posted May 19, 2011 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 Quote Link to comment
Recommended Posts
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.