adjustxy(
RECTANGLE
,
BOUNDARY
,
DELTAV
,
DELTAH
)

The adjustxy( function adjusts the four corners of a rectangle. However, only corners that are inside a boundary are adjusted. Corners outside the boundary are left alone.


Parameters

This function has four parameters:

rectangle – is the rectangle that is being adjusted.

boundary – is a rectangle describing the area to be adjusted. Only points inside this rectangle will be adjusted.

deltav – is the vertical distance each corner inside the boundary should be adjusted.

deltah – is the horizontal distance each corner inside the boundary should be adjusted.


Description

The procedure below uses adjustxy to help move a slider on a form. This procedure is designed to be triggered by a button with the Click/Release option turned off.

local drag,dragstart,deltaV,deltaH,slider,slidebox
drag=info("buttonrectangle")
dragstart=drag
slider=xytoxy(drag,"s","f")
slider=rectangleadjust(slider,0,0,1,1)
selectobjects intersectionrectangle(xytoxy(drag,"s","f"),
    objectinfo("rectangle") <> rectangle(0,0,0,0))
slidebox=xytoxy( objectinfo("boundary"),"f","s")
slidebox=rectangleadjust(insidewindow,0,16,0,-16)
draggraybox drag,slidebox,info("windowrectangle"),1
if drag="" stop endif
deltaV=rtop(drag)-rtop(dragstart)
deltaH=rleft(drag)-rleft(dragstart)
changeobjects "rectangle",
adjustxy(objectinfo("rectangle"),slider,deltaV,deltaH)

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0