Nebeor Posted April 30, 2019 Share Posted April 30, 2019 (edited) VWObject errorBox(gSDK->CreateRectangle(WorldRect(WorldPt(0,0),WorldPt(1000,1000)))); InternalIndex hatchIndex; gSDK->NameToInternalIndexN("ErrorHatch", hatchIndex); //VWPattern hatchPat(hatchIndex); //errorBox.GetObjectAttribs().SetFillPattern(hatchPat); gSDK->SetFillPat(errorBox,hatchIndex); Hello there, I would like to add a hatch pattern that exists in my resource browser to my 2D rectangle (as if I would just drag and drop), but this does not work, what am I doing wrong? Edited April 30, 2019 by Nebeor Quote Link to comment
Nicolas Goutte Posted April 30, 2019 Share Posted April 30, 2019 If I remember well and if I am not mixing it up with something else, you have to use -hatchIndex to set an hatch. (I cannot find back a discussion I have in mind, so probably it was a private email exchange and not a post in this forum or in the old SDK mailing list.) Quote Link to comment
Nebeor Posted May 2, 2019 Author Share Posted May 2, 2019 Thanks @Nicolas Goutte but, Isn't that just what i'm trying to do? what do you mean with the '-' before hatchIndex?, I'm thinking I have to set a variable somewhere. Quote Link to comment
Nicolas Goutte Posted May 2, 2019 Share Posted May 2, 2019 You have to negate the internal index when setting: gSDK->SetFillPat(errorBox, -hatchIndex); 1 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.