Jump to content

setWidth and setHeight of a rounded rectangle?


zuken86

Recommended Posts

I can't seem to be able to change the width and height of a rounded rectangle through vectorscript. Am I doing something wrong?

PROCEDURE test;

VAR

h:HANDLE;

BEGIN

RRect(0,0,200,100,20,20);

h:=LNewObj;

SetWidth(h,300);

SetHeight(h,200);

END;

RUN(test);

Thanks,

Link to comment

Or try:

scaleX := NewXValue/ OldXValue;

scaleY := NewYValue/ OldYValue;

HScale2D(h: HANDLE; centerX, centerY, scaleX, scaleY: REAL; scaleText: BOOLEAN);

where (centerX, centerY) is your XY anchor point.

In the case of a RRect, the corner radii will scale, too. You'll have to reset them with:

GetRRDiam(H, XDiam, YDiam);

and

SetRRDiam(H, XDiam, YDiam);

Raymond

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