David Poiron 33 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 Share this post Link to post
DCarpenter 1 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 Share this post Link to post
MullinRJ 203 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 Share this post Link to post
DCarpenter 1 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 Share this post Link to post
DCarpenter 1 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 Share this post Link to post