home *** CD-ROM | disk | FTP | other *** search
- /* $VER: PlaceGraphicAt.rexx 1.1 (11.08.96)
- Copyright 1996 SoftLogik Publishing Corporation
- May not be distributed without SoftLogik Publishing Corporation's express written permission */
-
- OPTIONS RESULTS
- TRACE OFF
-
- /* Make sure rexx support is opened */
- IF ~SHOW('L','rexxsupport.library') THEN
- CALL ADDLIB('rexxsupport.library',0,-30)
- IF ~SHOW('L','softlogik:libs/slarexxsupport.library') THEN
- CALL ADDLIB('softlogik:libs/slarexxsupport.library', 0, -30)
-
- ADDRESS 'PAGESTREAM'
-
- /* SELECT THE GRAPHIC */
- 'refresh wait'
- 'placegraphic status'
- if rc~=0 then signal cancel
-
- /* GET THE OBJECT ID AND TYPE */
- 'getobject type objtype'
- objnum=result
-
- /* POSITION THE PICTURE */
- getregion coord message '"Click or drag to place the picture."'
- if rc=10 then do
- 'deleteobject'
- signal cancel
- end
-
- if (abs(coord.x1-coord.x2))<0.25 | (abs(coord.y1-coord.y2))<0.25 then DO
- if objtype=12 then getpicture position pstem
- if objtype=2 then getdrawing position pstem
- if objtype=13 then geteps position pstem
- coord.x2=pstem.right-pstem.left+coord.x1
- coord.y2=pstem.bottom-pstem.top+coord.y1
- end
-
- if objtype=12 then editpicture position coord.x1 coord.y1 coord.x2 coord.y2
- if objtype=2 then editdrawing position coord.x1 coord.y1 coord.x2 coord.y2
- if objtype=13 then editeps position coord.x1 coord.y1 coord.x2 coord.y2
-
- 'refresh continue'
-
- EXIT
-
-
- CANCEL:
- 'refresh continue'
- EXIT
-