Jump to content
Developer Wiki and Function Reference Links ×

Locate a reference shape in the start point


rebu1985

Recommended Posts

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

 

Captura de pantalla 2017-11-22 a las 10.43.36.png

Link to comment

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.

 

 

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