Jump to content

rectangle stretch in increments


josue Corona

Recommended Posts

Hello WhoCanDo and Larry,

and yes (whocando) basically that's what I am trying to accomplish, that the object to duplicate itself, next to each other as I stretch the rectangle but it will stretch in its own increments. The size of the starting rectangle can be determine in the object info. 

Larry Can the grid spacing be determine if I try that alternative for now?

Link to comment

I'm still not understanding your intention, but I'm guessing the following. Draw a rectangle and leave it selected. Run the macro and the elastic band will determine X and the location of the new rectangle.

 

procedure Stretch_and_Move;

var
pt1, pt2 : vector;
wth, ht : real;

begin
if (Count (Sel = True) = 1) then
  begin
  pt1.x := LeftBoundN (Sel = True);
  pt1.y := TopBoundN (Sel = True);
  wth := Width (Sel = True);
  ht := Height (Sel = True);
  DSelectAll;
  GetPtL (pt1.x, pt1.y, pt2.x, pt2.y);
  RectangleN (pt2.x, pt2.y, 1, 0, pt2.x - pt1.x, -Abs (ht));
  end;
end;
run (Stretch_and_Move);

 

Edited by WhoCanDo
Revised RectangleN values
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...