zuken86 Posted April 23, 2013 Share Posted April 23, 2013 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, Quote Link to comment
Pat Stanford Posted April 23, 2013 Share Posted April 23, 2013 Rectangles, Rounded Rects, Ovals, Worksheets, Bitmaps are controlled by their bounding boxes. Check out the GetBBox and SetBBox commands to change the size of your Rounded Rects. Quote Link to comment
MullinRJ Posted April 23, 2013 Share Posted April 23, 2013 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 Quote Link to comment
zuken86 Posted April 24, 2013 Author Share Posted April 24, 2013 Hi, Thanks all for your feedbacks. I ended up extrude the 2D object first then use Set3DInfo to change with width, height and depth of the rounded rectangle. It works! 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.