rebu1985 Posted November 22, 2017 Share Posted November 22, 2017 Hi guys, I have create simple rectangles with different start points. You can see below a sample of a rectangle.I would like to create at the same time a square filled in red which shows me the start point of the rectangle. I have attached an image which shows different options of start point where i would like to locate the red square. I need a reference point on the shape in case i need to rotate, move, etc. Thank you so much, PROCEDURE Rectangle; VAR bc_ht,bc_wid : REAL; use_border,result : BOOLEAN; objname : STRING; oh,rh,wh : HANDLE; BEGIN result:= GetCustomObjectInfo(objname,oh,rh,wh); IF result THEN BEGIN bc_ht := PBOXWIDTH; bc_wid := PLINELENGTH; use_border := PUSE_BORDER; IF use_border THEN BEGIN PushAttrs; FillPat(0); Rect(0,bc_ht/2,bc_wid,-(bc_ht/2)); PopAttrs; END; END; END; Run(Rectangle); Quote Link to comment
Pat Stanford Posted November 25, 2017 Share Posted November 25, 2017 What kind of a PIO is this? I tried to create a tool with your script and the three parameters I could see and it does not do anything. By just reading your script I don't see how the script would draw using three different start points. Or even how it should know based on the parameters that it should draw with different start points. You could easily add another parameter to have it draw with a different start point, and then use either more If/Then statements or a Case statement to draw each way. Put the code to draw the start point square in each mode. 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.