Julian Carr Posted March 28, 2018 Share Posted March 28, 2018 Anyone know how to get the type of fill (hatch, tile or image) associated with an object? I know that GetFPat() will return a negative number for these fill types and you can get the name of the fill using GetVectorFill(), however this doesn't give you the fill type. There must be a way?? Thanks, Julian Quote Link to comment
Julian Carr Posted March 28, 2018 Author Share Posted March 28, 2018 I think I worked it out but the result is odd. Using GetVectorFill() you can get the name of the fill. Then using GetType(GetObject(FillName)), you get the object type as follows: Hatch: 66 Tile: 108 Image: 119 Gradient: 120 Here is the test code I used, which works on the fill of the selected object: Procedure T; VAR h : HANDLE; s1 : STRING; n : LONGINT; Flag : BOOLEAN; BEGIN h := FSActLayer; n := GetFPat( h ); s1 := Index2Name(n); Flag := GetVectorFill(h, s1); message( n , ' ', s1, ' ', GetType(GetObject(s1))); END; Run(T); 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.