ane Posted July 17, 2014 Share Posted July 17, 2014 Hi all, I see that there are some functions to specify the pen and fill styles of a class, but none to actually set them active, for example, I can set the foreground Color used for solid fills, but how can I actually set the class to "solid fill"? I see there is no direct function for this. I can read a classes fill style by using vs.GetObjectVariableInt(hdl, 696) and I found a documentation of the integer values used for the different styles (None, solid, pattern, hatch,...) on Vectorlab.info (is it possible this info is missing in the online Vectorscript Appendix?) But somehow I can't do the same thing with vs.SetObjectVariableInt. It throws an error message "SetObjectVariable failed with constant 696. This is typically due to the operation being not supported for the passed object handle" So it seems that property can be read but it is write protected? It seems to me, setting the fill style of a class is one of the most basic things to do and should be relatively easy to accomplish? What am I doing wrong here? By the way: I'm using python, but a Pascal example would do as well. Thanks for your help, Andi Quote Link to comment
Miguel Barrera Posted July 17, 2014 Share Posted July 17, 2014 I see that there are some functions to specify the pen and fill styles of a class, but none to actually set them active, for example, I can set the foreground Color used for solid fills, but how can I actually set the class to "solid fill"? Use PROCEDURE SetClFPat(className:STRING; fillpattern:LONGINT); basic fillpattern codes: 0 = No fill 1 = foreground color 2 = background color normally, you would set an object fill to the background color. Quote Link to comment
ane Posted August 4, 2014 Author Share Posted August 4, 2014 Thanks for your input Miguel, that did the trick. It's kind of tricky, that the first three "Raster Fill Patterns" are actually solid fills and unfortunately the fill pattern table in the online documentation Appendix is a "file not found"-Image... Just for any future reference: According to my tests, foreground and background seem to be the other way round: 0 = no fill 1 = solid background color 2 = solid foreground Color 3 and onwards: lots of raster fill patterns following 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.