Jump to content
Developer Wiki and Function Reference Links ×

Getting the Fill Type Used By an Object


Recommended Posts

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

Link to comment

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);

 

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...